Typedefs | |
typedef struct MessageQ_s * | MessageQ_t |
Message Queue handle. | |
Functions | |
MessageQ_t | MessageQCreate () |
Creates a new double linked list. | |
void | MessageQDestroy (MessageQ_t msgQ) |
Frees the specified message queue. | |
void | MessageQSend (MessageQ_t msgQ, void *msg) |
Sends the specified msg to the message queue. | |
int | MessageQAvailable (MessageQ_t msgQ) |
Returns the number of messages waiting in the queue. | |
void * | MessageQReceive (MessageQ_t msgQ) |
Receive a message from the queue, the return object should be unref'ed once finished with via ObjectRefDec. | |
void | MessageQSetQuit (MessageQ_t msgQ) |
Set the quit flag on the specified message queue. | |
void | MessageQResetQuit (MessageQ_t msgQ) |
Reset the quit flag on the specified message queue so messages can once again be received. | |
bool | MessageQIsQuitSet (MessageQ_t msgQ) |
Test whether the quit flag is set on the specified message queue. |
int MessageQAvailable | ( | MessageQ_t | msgQ | ) |
Returns the number of messages waiting in the queue.
msgQ | The message queue to count the waiting messages in. |
MessageQ_t MessageQCreate | ( | ) |
Creates a new double linked list.
void MessageQDestroy | ( | MessageQ_t | msgQ | ) |
Frees the specified message queue.
msgQ | The message queue to free. |
bool MessageQIsQuitSet | ( | MessageQ_t | msgQ | ) |
Test whether the quit flag is set on the specified message queue.
msgQ | The message queue to check. |
void* MessageQReceive | ( | MessageQ_t | msgQ | ) |
Receive a message from the queue, the return object should be unref'ed once finished with via ObjectRefDec.
If the quit flag is set on the message queue NULL will be returned.
msgQ | The queue to receive a message from. |
void MessageQResetQuit | ( | MessageQ_t | msgQ | ) |
Reset the quit flag on the specified message queue so messages can once again be received.
msgQ | The message queue to reset the quit flag on. |
void MessageQSend | ( | MessageQ_t | msgQ, | |
void * | msg | |||
) |
Sends the specified msg to the message queue.
msg must be allocated using Object(Alloc/Create) as on adding to the queue they will have their reference count increased using ObjectRefInc and any messages are left in the queue when it is destroyed they will first be unref'ed using ObjectRefDec().
msgQ | The message queue to send the message to. | |
msg | The object to send. |
void MessageQSetQuit | ( | MessageQ_t | msgQ | ) |
Set the quit flag on the specified message queue.
Once set all current and future calls to MessageQReceive will return NULL.
msgQ | The message queue to set the quit flag on. |