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