Amazon FreeRTOS:
POSIX
|
返回主页↑ |
消息队列。 更多……
#include "FreeRTOS_POSIX/time.h"
数据结构体 | |
struct | mq_attr |
消息队列属性。 更多…… | |
Typedef | |
typedef void * | mqd_t |
消息队列描述符。 | |
函数 | |
int | mq_close (mqd_t mqdes) |
关闭消息队列。 更多…… | |
int | mq_getattr (mqd_t mqdes, struct mq_attr *mqstat) |
获取消息队列属性。 更多…… | |
mqd_t | mq_open (const char *name, int oflag, mode_t mode, struct mq_attr *attr) |
打开消息队列。 更多…… | |
ssize_t | mq_receive (mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio) |
从消息队列接收消息。 更多…… | |
int | mq_send (mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio) |
向消息队列发送消息。 更多…… | |
ssize_t | mq_timedreceive (mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abstime) |
从超时的消息队列接收消息。 更多…… | |
int | mq_timedsend (mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abstime) |
将消息发送到超时的消息队列。 更多…… | |
int | mq_unlink (const char *name) |
删除消息队列。 更多…… | |
int mq_close | ( | mqd_t | mqdes | ) |
关闭消息队列。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_close.html
0 | ———成功完成后 |
-1 | ——发生错误。已设置 errno。 |
获取消息队列属性。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_getattr.html
0 | ———成功完成后 |
-1 | ——发生错误。已设置 errno。 |
打开消息队列。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html
消息 | 队列描述符–成功完成后 |
(mqd_t) | - 1 –发生错误。还设置了 errno。 |
从消息队列接收消息。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_receive.html
所选 | 消息的长度(以字节为单位) ———成功完成后。消息已从队列中删除 |
-1 | ——发生错误。已设置 errno。 |
int mq_send | ( | mqd_t | mqdes, |
const char * | msg_ptr, | ||
size_t | msg_len, | ||
unsigned | msg_prio | ||
) |
向消息队列发送消息。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_send.html
0 | ——成功完成后。 |
-1 | ——发生错误。已设置 errno。 |
ssize_t mq_timedreceive | ( | mqd_t | mqdes, |
char * | msg_ptr, | ||
size_t | msg_len, | ||
unsigned * | msg_prio, | ||
const struct timespec * | abstime | ||
) |
从消息队列接收超时消息。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_timedreceive.html
所选 | 消息的长度(以字节为单位) ———成功完成后。消息已从队列中删除 |
-1 | ——发生错误。已设置 errno。 |
int mq_timedsend | ( | mqd_t | mqdes, |
const char * | msg_ptr, | ||
size_t | msg_len, | ||
unsigned | msg_prio, | ||
const struct timespec * | abstime | ||
) |
将消息发送到超时的消息队列。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_timedsend.html
0 | ——成功完成后。 |
-1 | ——发生错误。已设置 errno。 |
int mq_unlink | ( | const char * | name | ) |
删除消息队列。
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_unlink.html
0 | ——成功完成后。 |
-1 | ——发生错误。已设置 errno。 |