osQueuePend function
BOOL osQueuePend(
  HANDLE Handle,
  PVOID Buffer

Handle of pointers queue object.


Pointer to buffer that receives a message.

Return value:

TRUE on success or FALSE on failure. Use osGetLastError function to obtain extended error information.


Function allows to read and later to remove the first message from the queue.

When the queue is empty, the function fails if OS_IPC_WAIT_IF_EMPTY was not specified. Otherwise it will be waiting until the data appear. When the function is waiting and direct read-write is enabled (OS_IPC_DIRECT_READ_WRITE mode flag was specified during object creation), the data will be sent directly from one task to the waiting task, without storing it in the queue.

For more information about the queue see the queue objects section.

Function is available only, when the value of OS_USE_QUEUE and OS_QUEUE_POST_PEND_FUNC constants is set to 1.

SpaceShadow documentation