#include <oskit/threads/pthread.h>
#include <oskit/threads/cpuinherit.h>oskit_error_t pthread_sched_message_recv(schedmsg_t *msg, oskit_s32_t timeout);
Initiate a scheduling message receive operation. If there are any scheduling messages queued on the scheduler's message queue, the first message will be dequeued and copied into the message buffer pointed to by msg. The format of the message is described in Section 25.6.2. If timeout is zero, and no message is ready for delivery, the call will return immediately with the error value OSKIT_EAGAIN. If timeout is any non-zero value, the caller will block until a message is available. A future release will allow the specification of an actual timeout value.
- msg
- A message buffer in which to place a message if one is available.
- timeout
- A timeout value, in milliseconds.
Returns 0 on success, or OSKIT_EAGAIN if the caller specified a non-blocking receive and no message was available.
pthread_sched_donate_wait_recv