MentOS
0.8.0
The Mentoring Operating System
|
Classes | |
struct | msq_info_t |
Message queue management structure. More... | |
Macros | |
#define | __DEBUG_HEADER__ "[IPCmsg]" |
Change header. | |
#define | __DEBUG_LEVEL__ LOGLEVEL_NOTICE |
Set log level. | |
Functions | |
static msq_info_t * | __msq_info_alloc (key_t key, int msqflg) |
Allocates the memory for message queue structure. More... | |
static void | __msq_info_dealloc (msq_info_t *msq_info) |
Frees the memory of a message queue management structure. More... | |
static msq_info_t * | __list_find_msq_info_by_id (int msqid) |
Searches for the message queue with the given id. More... | |
static msq_info_t * | __list_find_msq_info_by_key (key_t key) |
Searches for the message queue with the given key. More... | |
static void | __list_add_msq_info (msq_info_t *msq_info) |
Adds the structure to the global list. More... | |
static void | __list_remove_msq_info (msq_info_t *msq_info) |
Removes the structure from the global list. More... | |
static void | __msq_info_push_message (msq_info_t *msq_info, struct msg *message) |
Pushes a messages inside the message queue. More... | |
static void | __msq_info_remove_message (msq_info_t *msq_info, struct msg *message) |
Removes the message from the message queue. More... | |
int | msq_init (void) |
Iinitializes the message queue system. More... | |
int | sys_msgget (key_t key, int msgflg) |
int | sys_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) |
ssize_t | sys_msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg) |
int | sys_msgctl (int msqid, int cmd, struct msqid_ds *buf) |
ssize_t | procipc_msg_read (vfs_file_t *file, char *buf, off_t offset, size_t nbyte) |
Read function for the proc system. More... | |
Variables | |
static int | __msq_id = 0 |
A value to compute the message queue ID. | |
list_head | msq_list |
List of all current active Message queues. | |
|
inlinestatic |
Adds the structure to the global list.
msq_info | the structure to add. |
|
inlinestatic |
Searches for the message queue with the given id.
msqid | the id we are searching. |
|
inlinestatic |
Searches for the message queue with the given key.
key | the key we are searching. |
|
inlinestatic |
Removes the structure from the global list.
msq_info | the structure to remove. |
|
inlinestatic |
Allocates the memory for message queue structure.
key | IPC_KEY associated with message queue. |
msqflg | flags used to create message queue. |
|
inlinestatic |
Frees the memory of a message queue management structure.
msq_info | pointer to the message queue management structure. |
|
inlinestatic |
Pushes a messages inside the message queue.
msq_info | the structure that will contain the message. |
message | the message to push. |
|
inlinestatic |
Removes the message from the message queue.
msq_info | the structure that contains the message. |
message | the message to remove. |
int msq_init | ( | void | ) |
Iinitializes the message queue system.
ssize_t procipc_msg_read | ( | vfs_file_t * | file, |
char * | buf, | ||
off_t | offset, | ||
size_t | nbyte | ||
) |
Read function for the proc system.
file | The file. |
buf | Buffer where the read content must be placed. |
offset | Offset from which we start reading from the file. |
nbyte | The number of bytes to read. |