1MQ_SETATTR(3P) POSIX Programmer's Manual MQ_SETATTR(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 mq_setattr - set message queue attributes (REALTIME)
13
15 #include <mqueue.h>
16
17 int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict mqstat,
18 struct mq_attr *restrict omqstat);
19
20
22 The mq_setattr() function shall set attributes associated with the open
23 message queue description referenced by the message queue descriptor
24 specified by mqdes.
25
26 The message queue attributes corresponding to the following members
27 defined in the mq_attr structure shall be set to the specified values
28 upon successful completion of mq_setattr():
29
30 mq_flags
31 The value of this member is the bitwise-logical OR of zero or
32 more of O_NONBLOCK and any implementation-defined flags.
33
34
35 The values of the mq_maxmsg, mq_msgsize, and mq_curmsgs members of the
36 mq_attr structure shall be ignored by mq_setattr().
37
38 If omqstat is non-NULL, the mq_setattr() function shall store, in the
39 location referenced by omqstat, the previous message queue attributes
40 and the current queue status. These values shall be the same as would
41 be returned by a call to mq_getattr() at that point.
42
44 Upon successful completion, the function shall return a value of zero
45 and the attributes of the message queue shall have been changed as
46 specified.
47
48 Otherwise, the message queue attributes shall be unchanged, and the
49 function shall return a value of -1 and set errno to indicate the
50 error.
51
53 The mq_setattr() function shall fail if:
54
55 EBADF The mqdes argument is not a valid message queue descriptor.
56
57
58 The following sections are informative.
59
61 None.
62
64 None.
65
67 None.
68
70 None.
71
73 mq_open(), mq_send(), mq_timedsend(), msgctl(), msgget(), msgrcv(),
74 msgsnd(), the Base Definitions volume of IEEE Std 1003.1-2001,
75 <mqueue.h>
76
78 Portions of this text are reprinted and reproduced in electronic form
79 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
80 -- Portable Operating System Interface (POSIX), The Open Group Base
81 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
82 Electrical and Electronics Engineers, Inc and The Open Group. In the
83 event of any discrepancy between this version and the original IEEE and
84 The Open Group Standard, the original IEEE and The Open Group Standard
85 is the referee document. The original Standard can be obtained online
86 at http://www.opengroup.org/unix/online.html .
87
88
89
90IEEE/The Open Group 2003 MQ_SETATTR(3P)