structmq_attr { longint mq_flags; /* Message queue flags. */ longint mq_maxmsg; /* Maximum number of messages. */ longint mq_msgsize; /* Maximum message size. */ longint mq_curmsgs; /* Number of messages currently queued. */ };
mq_open
1 2 3 4 5 6 7 8 9
/* Establish connection between a process and a message queue NAME and return message queue descriptor or (mqd_t) -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created message queue, and the fourth argument is taken as `struct mq_attr *', pointer to message queue attributes. If the fourth argument is NULL, default attributes are used. */ externmqd_tmq_open(constchar *__name, int __oflag, ...) __THROW __nonnull((1));
mq_close
1 2 3
/* Removes the association between message queue descriptor MQDES and its message queue. */ externintmq_close(mqd_t __mqdes) __THROW;
mq_getattr
1 2 3
/* Query status and attributes of message queue MQDES. */ externintmq_getattr(mqd_t __mqdes, struct mq_attr *__mqstat) __THROW __nonnull((2));
mq_setattr
1 2 3 4 5 6
/* Set attributes associated with message queue MQDES and if OMQSTAT is not NULL also query its old attributes. */ externintmq_setattr(mqd_t __mqdes, const struct mq_attr *__restrict __mqstat, struct mq_attr *__restrict __omqstat) __THROW __nonnull((2));