Get a message queue's attributes
#include <mqueue.h> int mq_getattr( mqd_t mqdes, struct mq_attr* mqstat );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Use the -l mq option to qcc to link against this library.
The mq_getattr() function determines the current attributes of the queue referenced by mqdes. These attributes are stored in the location pointed to by mqstat.
|The message queue manager needs to be running. Neutrino supports two implementations of message queues: a traditional implementation, and an alternate one that uses the mq server and a queue in kernel space. For more information, see the entries for mq and mqueue in the Utilities Reference, as well as the POSIX Message Queues: Two Implementations technote.|
The fields of the mq_attr structure are as follows:
|The alternate (mq) implementation of message queues doesn't see the non-POSIX mq_sendwait and mq_recvwait fields.|
-1 if an error occurred (errno is set). Any other value indicates success.
POSIX 1003.1 MSG
mq_close(), mq_open(), mq_receive(), mq_send(), mq_setattr()
mq, mqueue in the Utilities Reference
“POSIX message queues” in the “Interprocess Communication (IPC)” chapter of System Architecture
POSIX Message Queues: Two Implementations technote.