osdMessageQueue: This is the mirror of Heinz Junkes' earlier fix
When sending a message, if the queue is full so we have to wait, we create a threadNode with an eventNode in it and stick it on the sendQueue, then wait for a receiver to signal that event, waking us. If we awoke due to a timeout but a receiver was actually waking us up anyway (i.e. eventSent was set), we shouldn't give up.
This commit is contained in:
@@ -207,8 +207,7 @@ mySend(epicsMessageQueueId pmsg, void *message, unsigned int size,
|
||||
|
||||
freeEventNode(pmsg, threadNode.evp, status);
|
||||
|
||||
if ((pmsg->full && (ellFirst(&pmsg->receiveQueue) == NULL)) ||
|
||||
status != epicsEventOK) {
|
||||
if (pmsg->full && (ellFirst(&pmsg->receiveQueue) == NULL)) {
|
||||
epicsMutexUnlock(pmsg->mutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user