Go to the source code of this file.
|
int | mq_getattr (mqd_t mqdes, struct mq_attr *attr) |
| Retrieve atributes of the message queue referred to by the message queue descriptor mqdes. More...
|
|
int | mq_setattr (mqd_t mqdes, const struct mq_attr *newattr, struct mq_attr *oldattr) |
| Modify attributes of the message queue referred to by the message queue descriptor mqdes. More...
|
|
mqd_t | mq_open (const char *name, int oflag, struct mq_attr *attr) |
| Create a new message queue or open an existing queue. More...
|
|
int | mq_close (mqd_t mqdes) |
| Close the message queue descriptor. More...
|
|
int | mq_unlink (const char *name) |
|
ssize_t | mq_receive (mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio) |
| Remove the oldest message with highest priority from the message queue referred to by the message queue descriptor mqdes and places it in the buffer pointed to by msg_ptr. More...
|
|
int | mq_send (mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio) |
| Add the message pointed to by msg_ptr to the message queue referred to by the message queue descriptor mqdes. More...
|
|
◆ mq_close()
int mq_close |
( |
mqd_t |
mqdes | ) |
|
Close the message queue descriptor.
- Parameters
-
mqdes | The message queue descriptor to provide. |
- Return values
-
int | 0 on success and nonzero error number on error. |
◆ mq_getattr()
int mq_getattr |
( |
mqd_t |
mqdes, |
|
|
struct mq_attr * |
attr |
|
) |
| |
Retrieve atributes of the message queue referred to by the message queue descriptor mqdes.
- Parameters
-
mqdes | The message queue descriptor to provide. |
newattr | Pointer to the new attribute. |
oldattr | Pointer to the memory space for storing old attributes. |
- Return values
-
int | 0 on success and nonzero error number on error. |
◆ mq_open()
mqd_t mq_open |
( |
const char * |
name, |
|
|
int |
oflag, |
|
|
struct mq_attr * |
attr |
|
) |
| |
Create a new message queue or open an existing queue.
- Parameters
-
name | The name of the message queue. |
oflag | The flags for opening the message queue. |
attr | The attribute object for setting the message queue. |
- Return values
-
mqd_t | The message queue descriptor to return. |
◆ mq_receive()
ssize_t mq_receive |
( |
mqd_t |
mqdes, |
|
|
char * |
msg_ptr, |
|
|
size_t |
msg_len, |
|
|
unsigned int * |
msg_prio |
|
) |
| |
Remove the oldest message with highest priority from the message queue referred to by the message queue descriptor mqdes and places it in the buffer pointed to by msg_ptr.
- Parameters
-
mqdes | The message queue descriptor to provide. |
msg_ptr | The buffer for storing the received message. |
msg_len | The length of the buffer pointed to by msg_ptr. |
msg_prio | The priority of the received message. |
- Return values
-
ssize_t | The size of the received message in bytes. |
◆ mq_send()
int mq_send |
( |
mqd_t |
mqdes, |
|
|
const char * |
msg_ptr, |
|
|
size_t |
msg_len, |
|
|
unsigned int |
msg_prio |
|
) |
| |
Add the message pointed to by msg_ptr to the message queue referred to by the message queue descriptor mqdes.
- Parameters
-
mqdes | The message queue descriptor to provide. |
msg_ptr | The message to send. |
msg_len | The size of the message in bytes. |
msg_prio | The priority of the message to send. |
- Return values
-
int | 0 on success and nonzero error number on error. |
◆ mq_setattr()
int mq_setattr |
( |
mqd_t |
mqdes, |
|
|
const struct mq_attr * |
newattr, |
|
|
struct mq_attr * |
oldattr |
|
) |
| |
Modify attributes of the message queue referred to by the message queue descriptor mqdes.
- Parameters
-
mqdes | The message queue descriptor to provide. |
attr | The memory space for retrieving message queue attributes. |
- Return values
-
int | 0 on success and nonzero error number on error. |