Functions | |
int | NutMsgQBroadcast (u_char id, int param, void *data) |
Send a message to all message ques. | |
NUTMSGQ * | NutMsgQCreate (u_char bits) |
Allocate a new message que. | |
void | NutMsgQFlush (NUTMSGQ *que) |
Removes all entries from a que. | |
int | NutMsgQFull (NUTMSGQ *que) |
Checks the state of a que. | |
int | NutMsgQGetMessage (NUTMSGQ *que, NUTMSG *msg, u_long timeout) |
Gets the next message from the que. | |
int | NutMsgQPost (NUTMSGQ *que, u_char id, int param, void *data) |
Send a message to a que and return immediately. | |
int | NutMsgQSend (NUTMSGQ *que, u_char id, int param, void *data) |
Send a message to a que and yields so that a waiting thread can act on the message. | |
HANDLE | NutMsgQStartTimer (NUTMSGQ *que, u_long ms, int param, void *data, u_char flags) |
Starts a periodic or one-shot timer on the given que. | |
void | NutMsgQStopTimer (HANDLE timer) |
Stops a timer. | |
Variables | |
NUTMSGTMR * | nutMsgFreeTimers |
NUTMSGQ * | nutMsgQue |
global list of ques |
int NutMsgQBroadcast | ( | u_char | id, | |
int | param, | |||
void * | data | |||
) |
Send a message to all message ques.
id | the id of the sent message | |
param | the param of the sent message | |
data | the data of the sent message |
NUTMSGQ* NutMsgQCreate | ( | u_char | bits | ) |
Allocate a new message que.
bits | size of the que in bits |
int NutMsgQFull | ( | NUTMSGQ * | que | ) |
Checks the state of a que.
int NutMsgQGetMessage | ( | NUTMSGQ * | que, | |
NUTMSG * | msg, | |||
u_long | timeout | |||
) |
Gets the next message from the que.
que | the que to wait on | |
msg | pointer to memory to return data to | |
timeout | how long to wait for a message |
int NutMsgQPost | ( | NUTMSGQ * | que, | |
u_char | id, | |||
int | param, | |||
void * | data | |||
) |
Send a message to a que and return immediately.
que | the que to send to | |
id | the id of the sent message | |
param | the param of the sent message | |
data | the data of the sent message |
int NutMsgQSend | ( | NUTMSGQ * | que, | |
u_char | id, | |||
int | param, | |||
void * | data | |||
) |
Send a message to a que and yields so that a waiting thread can act on the message.
The sending thread should have a lower priority than the receiver thread
que | the que to send to | |
id | the id of the sent message | |
param | the param of the sent message | |
data | the data of the sent message |
Starts a periodic or one-shot timer on the given que.
que | the que to send to | |
ms | timeout length of the timer | |
param | the param of the sent message | |
data | the data of the sent message | |
flags | 0 or TM_ONESHOT |
void NutMsgQStopTimer | ( | HANDLE | timer | ) |
Stops a timer.
timer | HANDLE of the timer to stop |