9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / mq_setattr.3c
blobef19ce904834c498ad5fcdd912bf3a283963487e
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
45 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
46 .\"
47 .TH MQ_SETATTR 3C "Feb 5, 2008"
48 .SH NAME
49 mq_setattr \- set/get message queue attributes
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <mqueue.h>
55 \fBint\fR \fBmq_setattr\fR(\fBmqd_t\fR \fImqdes\fR, \fBconst struct mq_attr *\fR\fImqstat\fR,
56      \fBstruct mq_attr *\fR\fIomqstat\fR);
57 .fi
59 .SH DESCRIPTION
60 .sp
61 .LP
62 The \fBmq_setattr()\fR function is used to set attributes associated with the
63 open message queue description referenced by the message queue descriptor
64 specified by \fImqdes\fR.
65 .sp
66 .LP
67 The message queue attributes corresponding to the following members defined in
68 the \fBmq_attr\fR structure are set to the specified values upon successful
69 completion of \fBmq_setattr()\fR:
70 .sp
71 .ne 2
72 .na
73 \fB\fBmq_flags\fR \fR
74 .ad
75 .RS 13n
76 The value of this member is either \fB0\fR or  \fBO_NONBLOCK.\fR
77 .RE
79 .sp
80 .LP
81 The values of \fBmq_maxmsg\fR, \fBmq_msgsize\fR, and \fBmq_curmsgs\fR are
82 ignored by \fBmq_setattr()\fR.
83 .sp
84 .LP
85 If \fIomqstat\fR is non-\fINULL\fR, \fBmq_setattr()\fR stores, in the location
86 referenced by \fIomqstat\fR, the previous message queue attributes and the
87 current queue status. These values are the same as would be returned by a call
88 to \fBmq_getattr()\fR at that point.
89 .SH RETURN VALUES
90 .sp
91 .LP
92 Upon successful completion, \fBmq_setattr()\fR returns \fB0\fR and the
93 attributes of the message queue will have been changed as specified. Otherwise,
94 the message queue attributes are unchanged, and the function returns
95 \fB\(mi1\fR and sets \fBerrno\fR to indicate the error.
96 .SH ERRORS
97 .sp
98 .LP
99 The \fBmq_setattr()\fR function will fail if:
101 .ne 2
103 \fB\fBEBADF\fR \fR
105 .RS 11n
106 The \fImqdes\fR argument is not a valid message queue descriptor.
110 .ne 2
112 \fB\fBENOSYS\fR \fR
114 .RS 11n
115 The \fBmq_setattr()\fR function is not supported by the system.
118 .SH ATTRIBUTES
121 See \fBattributes\fR(5) for descriptions of the following attributes:
126 box;
127 c | c
128 l | l .
129 ATTRIBUTE TYPE  ATTRIBUTE VALUE
131 Interface Stability     Committed
133 MT-Level        MT-Safe
135 Standard        See \fBstandards\fR(5).
138 .SH SEE ALSO
141 \fBmsgctl\fR(2), \fBmsgget\fR(2), \fBmsgrcv\fR(2), \fBmsgsnd\fR(2),
142 \fBmq_getattr\fR(3C), \fBmq_open\fR(3C), \fBmq_receive\fR(3C),
143 \fBmq_send\fR(3C), \fBmqueue.h\fR(3HEAD), \fBattributes\fR(5),
144 \fBstandards\fR(5)
145 .SH NOTES
148 Solaris 2.6 was the first release to support the Asynchronous Input and Output
149 option. Prior to this release, this function always returned \fB\(mi1\fR and
150 set \fBerrno\fR to \fBENOSYS\fR.