Hmm... I see that my name is on the code in osi/os/default/osdMessageQueue.cpp but I don't think that I actually wrote it. I would have expected that all allocation would be done at message queue initialization -- I agree that allocating at run-time is a poor idea.
Hi Andrew
The PREEMPT_RT patch makes the kernel fully pre-emptive (leading to improved maximum latency) and adds support for priority inheritance mutexes. There are no user space API changes, the code to use _POSIX_THREAD_PRIORITY_SCHEDULING and _POSIX_THREAD_PRIO_INHERIT is already in libCom (if disabled by default). I'd like to use the epicsMessageQueue from a high priority thread but the send and receive functions may calloc an eventNode, and that might cause a page fault or block my thread on the malloc lock. I'd like to be able to pre-allocate the eventNodes because I know the maximum number of threads that may wait on the queue in advance.
James
|