|
libcfe
0.12.1
some useful C-functions
|
Go to the source code of this file.
Macros | |
| #define | MSG_PRIORITY 1 |
| Indicates a message as important. More... | |
| #define | MSG_NOBLOCK 2 |
| TODO. More... | |
Functions | |
| int | send_message (int qid, int type, char *msg, int len, short flag) |
| int | receive_message (int qid, int type, char **msg) |
| int | remove_queue (int qid) |
| int | create_queue (void) |
| #define MSG_NOBLOCK 2 |
TODO.
Definition at line 6 of file msgqueue.h.
| #define MSG_PRIORITY 1 |
Indicates a message as important.
Even when the queue is full, there is some space left for important messages.
Definition at line 5 of file msgqueue.h.
| int create_queue | ( | void | ) |
Create a new message queue.
Definition at line 116 of file msgqueue.c.
| int receive_message | ( | int | qid, |
| int | type, | ||
| char ** | msg | ||
| ) |
Receive a message from a message queue.
| [in] | qid | The message queue to send the message to. |
| [in] | type | Type of message, must be > 0. |
| [in,out] | msg | NULL pointer, afterwards this points to the received message. |
Definition at line 86 of file msgqueue.c.
| int remove_queue | ( | int | qid | ) |
Destroy a message queue.
| [in] | qid | The message queue to destroy. |
Definition at line 106 of file msgqueue.c.
| int send_message | ( | int | qid, |
| int | type, | ||
| char * | msg, | ||
| int | len, | ||
| short | flag | ||
| ) |
function to call to send a message
| [in] | qid | The message queue to send the message to. |
| [in] | type | Type of message, must be > 0. |
| [in] | msg | Pointer to a string containing the actual text (terminating character is not required). |
| [in] | len | Number of characters to copy from 'msg' to the message queue (when 'len' == 0 it copy up to the first '\0' character). |
| [in] | flag | Set to MSG_PRIORITY to indicate this as important message, otherwise use 0. |
Definition at line 24 of file msgqueue.c.