Synopsis
#include <ctl_api.h> unsigned ctl_message_queue_receive(CTL_MESSAGE_QUEUE_t *m, void **message, CTL_TIMEOUT_t timeoutType, CTL_TIME_t timeout);
Description
The function ctl_message_queue_receive pops the oldest message in the message queue pointed at by m into the memory pointed at by message. This function will block if no messages are available unless timeoutType is non-zero and the current time reaches the timeout value. If the timeout occured the function returns zero otherwise it returns 1.
Restrictions
This function should not be called from an interrupt service routine.
Portability
ctl_message_queue_receive is provided in every implementation of the CrossWorks tasking library.