BOOL osQueuePend( HANDLE Handle, PVOID Buffer );
The handle to the queue object.
A pointer to the buffer where the message will be received.
Returns TRUE on success or FALSE on failure. Call the osGetLastError function to obtain extended error information.
This function retrieves and subsequently removes the first message from the front of the queue.
If the queue is empty, the function will fail immediately unless the OS_IPC_WAIT_IF_EMPTY flag was specified during creation. If enabled, the calling task will block until data becomes available. When the task is in a waiting state and direct read-write access is enabled (via the OS_IPC_DIRECT_READ_WRITE mode flag), data may be transferred directly from a sending task to the waiting task, bypassing the internal queue buffer.
For further details regarding queues, refer to the queue objects section.
This function is available only when the OS_USE_QUEUE and OS_QUEUE_POST_PEND_FUNC constants are both set to 1.
| Version: | 1.0 |
|---|---|
| Header file: | OS_Queue.h (include OS_API.h) |
| See also: | BOOL, FALSE, HANDLE, OS_IPC_DIRECT_READ_WRITE, OS_IPC_WAIT_IF_EMPTY, OS_USE_QUEUE, osCreateQueue, osGetLastError, osQueuePost, osQueuePeek, PVOID, queues, TRUE |