set the flags for a message queue
#include <mqueue.h> int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat );
The mq_setattr() function is used to set the mq_flags field of the structure pointed to by mqstat for the queue specified by mqdes. If omqstat isn't NULL, then the location it references is used to store the old attribute structure.
The mq_maxmsg and mq_msgsize fields of mqstat are ignored. |
For information on the bits in the mq_flags field, see "Message-queue structures" in the chapter on POSIX.4 message queues.
If the attributes are successfully changed, then 0 is returned. If not, -1 is returned, the attributes aren't changed, and errno is set.
POSIX 1003.4, with extensions
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes, but modifies errno |
Thread | Yes |
In order to use the mq_... functions, you must:
errno, mq_close(), mq_getattr(), mq_notify(), mq_open(), mq_receive(), mq_send(), mq_unlink()
chapter on POSIX.4 message queues