next up previous contents index
Next: 25.6.4 pthread_sched_setstate: Set the Up: 25.6 CPU Inheritance Framework Previous: 25.6.2 pthread_sched_donate_wait_recv: Donate CPU

25.6.3 pthread_sched_message_recv: Scheduling message receive

 

SYNOPSIS

#include <oskit/threads/pthread.h>
#include <oskit/threads/cpuinherit.h>

oskit_error_t pthread_sched_message_recv(schedmsg_t *msg, oskit_s32_t timeout);

DESCRIPTION

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.

PARAMETERS

msg
A message buffer in which to place a message if one is available.
timeout
A timeout value, in milliseconds.

RETURNS

Returns 0 on success, or OSKIT_EAGAIN if the caller specified a non-blocking receive and no message was available.

RELATED INFORMATION

pthread_sched_donate_wait_recv



Utah Flux Research Group