Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 8
Set a queue's attributes
#include <mqueue.h>
int mq_setattr( mqd_t mqdes,
const struct mq_attr* mqstat,
struct mq_attr* omqstat );
- mqdes
- The message-queue descriptor, returned by
mq_open(),
of the message queue that you want to set the attributes of.
- mqstat
- A pointer to a mq_attr structure that specifies the
attributes that you want to use for the message queue.
For more information about this structure, see
mq_getattr();
for information about which attributes you can set, see below.
- omqstat
- NULL, or a pointer to a mq_attr structure
where the function can store the old attributes of the message queue.
The mq_setattr() function sets the
mq_flags field for the specified queue (passed as the
mq_flags field in mqstat). If
omqstat isn't NULL, then the old attribute
structure is stored in the location that it points to.
|
Neutrino supports two implementations of message queues:
a traditional implementation, and an alternate one that uses
asynchronous messages.
For more information, see the entry for
mq and mqueue
in the Utilities Reference. |
This function ignores the mq_maxmsg, mq_msgsize, and
mq_curmsgs fields of mqstat.
The mq_flags field is the
bitwise OR of zero or more of the following constants:
- O_NONBLOCK
- No
mq_receive()
or
mq_send()
will ever block
on this queue. If the queue is in such a condition that the given
operation can't be performed without blocking, then an error is
returned, and errno is set to EAGAIN.
|
The settings that you make for mq_flags apply only to the
given message-queue description (i.e. locally), not to the queue itself. |
-1 if the function couldn't change the attributes
(errno
is set).
Any other value indicates success.
- EBADF
- Invalid message queue mqdes.
POSIX 1003.1 MSG
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
mq_getattr(),
mq_open(),
mq_receive(),
mq_send()
mq, mqueue
in the Utilities Reference
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 203
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_setattr.html on line 203