mqueue.h
来自「mgcp协议源代码和测试程序,还有一个编译器」· C头文件 代码 · 共 48 行
H
48 行
#ifndef __MQUEUE_H__
#define __MQUEUE_H__
#ifdef __cplusplus
extern "C" {#endif
/* Also defined in pthread.h */
#ifndef HAVE_STRUCT_TIMESPEC
#define HAVE_STRUCT_TIMESPEC
typedef unsigned long int timer_t;
struct timespec
{
timer_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
#endif
typedef unsigned int mqd_t;
struct mq_attr
{
long mq_flags; /* Message queue flags. */
long mq_maxmsg; /* Maximum number of messages. */
long mq_msgsize; /* Maximum message size. */
long mq_curmsgs; /* Number of messages currently queued. */
};
int mq_close(mqd_t mqdes);
mqd_t mq_open(const char *name, int oflag, ...);
int mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio);
int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio);
int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
unsigned *msg_prio, const struct timespec *abs_timeout);
int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
unsigned msg_prio, const struct timespec *abs_timeout);
int mq_unlink(const char *name);
#ifdef __cplusplus}#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?