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:
Andrew Johnson
2020-04-30 23:55:30 -05:00
parent 183c3b2a3e
commit aeed7cfbdd

View File

@@ -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;
}