xref: /dflybsd-src/lib/librt/mq_getattr.2 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino.\"	$NetBSD: mq_getattr.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
2*86d7f5d3SJohn Marino.\"
3*86d7f5d3SJohn Marino.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
4*86d7f5d3SJohn Marino.\"
5*86d7f5d3SJohn Marino.Dd August 19, 2009
6*86d7f5d3SJohn Marino.Dt MQ_GETATTR 2
7*86d7f5d3SJohn Marino.Os
8*86d7f5d3SJohn Marino.Sh NAME
9*86d7f5d3SJohn Marino.Nm mq_getattr
10*86d7f5d3SJohn Marino.Nd get message queue attributes (REALTIME)
11*86d7f5d3SJohn Marino.Sh LIBRARY
12*86d7f5d3SJohn Marino.Lb librt
13*86d7f5d3SJohn Marino.Sh SYNOPSIS
14*86d7f5d3SJohn Marino.In mqueue.h
15*86d7f5d3SJohn Marino.Ft int
16*86d7f5d3SJohn Marino.Fn mq_getattr "mqd_t mqdes" "struct mq_attr *mqstat"
17*86d7f5d3SJohn Marino.Sh DESCRIPTION
18*86d7f5d3SJohn MarinoThe
19*86d7f5d3SJohn Marino.Fn mq_getattr
20*86d7f5d3SJohn Marinofunction will obtain status information and attributes of the
21*86d7f5d3SJohn Marinomessage queue and the open message queue description associated
22*86d7f5d3SJohn Marinowith the message queue descriptor.
23*86d7f5d3SJohn Marino.Pp
24*86d7f5d3SJohn MarinoThe
25*86d7f5d3SJohn Marino.Fa mqdes
26*86d7f5d3SJohn Marinoargument specifies a message queue descriptor.
27*86d7f5d3SJohn Marino.Pp
28*86d7f5d3SJohn MarinoThe results are returned in the
29*86d7f5d3SJohn Marino.Vt mq_attr
30*86d7f5d3SJohn Marinostructure referenced by the
31*86d7f5d3SJohn Marino.Va mqstat
32*86d7f5d3SJohn Marinoargument.
33*86d7f5d3SJohn Marino.Pp
34*86d7f5d3SJohn MarinoUpon return, the following members have the values associated with
35*86d7f5d3SJohn Marinothe open message queue description as set when the message queue was
36*86d7f5d3SJohn Marinoopened and as modified by subsequent
37*86d7f5d3SJohn Marino.Xr mq_setattr 2
38*86d7f5d3SJohn Marinocalls:
39*86d7f5d3SJohn Marino.Va mq_flags .
40*86d7f5d3SJohn Marino.Pp
41*86d7f5d3SJohn MarinoThe following attributes of the message queue will be returned as set
42*86d7f5d3SJohn Marinoat message queue creation:
43*86d7f5d3SJohn Marino.Va mq_maxmsg ,
44*86d7f5d3SJohn Marino.Va mq_msgsize .
45*86d7f5d3SJohn Marino.Pp
46*86d7f5d3SJohn MarinoUpon return, the following members within the
47*86d7f5d3SJohn Marino.Vt mq_attr
48*86d7f5d3SJohn Marinostructure referenced by the
49*86d7f5d3SJohn Marino.Fa mqstat
50*86d7f5d3SJohn Marinoargument will be set to the current state of the message queue:
51*86d7f5d3SJohn Marino.Bl -tag -width mq_curmsgs
52*86d7f5d3SJohn Marino.It Va mq_curmsgs
53*86d7f5d3SJohn MarinoThe number of messages currently on the queue.
54*86d7f5d3SJohn Marino.El
55*86d7f5d3SJohn Marino.Sh RETURN VALUES
56*86d7f5d3SJohn Marino.Rv -std mq_getattr
57*86d7f5d3SJohn Marino.Sh ERRORS
58*86d7f5d3SJohn MarinoThe
59*86d7f5d3SJohn Marino.Fn mq_getattr
60*86d7f5d3SJohn Marinofunction may fail if:
61*86d7f5d3SJohn Marino.Bl -tag -width Er
62*86d7f5d3SJohn Marino.It Bq Er EBADF
63*86d7f5d3SJohn MarinoThe mqdes argument is not a valid message queue descriptor.
64*86d7f5d3SJohn Marino.El
65*86d7f5d3SJohn Marino.Sh SEE ALSO
66*86d7f5d3SJohn Marino.Xr mq_close 2 ,
67*86d7f5d3SJohn Marino.Xr mq_notify 2 ,
68*86d7f5d3SJohn Marino.Xr mq_open 2 ,
69*86d7f5d3SJohn Marino.Xr mq_receive 2 ,
70*86d7f5d3SJohn Marino.Xr mq_send 2 ,
71*86d7f5d3SJohn Marino.Xr mq_setattr 2 ,
72*86d7f5d3SJohn Marino.Xr mq_unlink 2
73*86d7f5d3SJohn Marino.Sh STANDARDS
74*86d7f5d3SJohn MarinoThis function conforms to the
75*86d7f5d3SJohn Marino.St -p1003.1-2001
76*86d7f5d3SJohn Marinostandard.
77*86d7f5d3SJohn Marino.Sh HISTORY
78*86d7f5d3SJohn MarinoThis function first appeared in
79*86d7f5d3SJohn Marino.Dx 2.5 .
80*86d7f5d3SJohn Marino.Sh COPYRIGHT
81*86d7f5d3SJohn MarinoPortions of this text are reprinted and reproduced in electronic form
82*86d7f5d3SJohn Marinofrom IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
83*86d7f5d3SJohn Marino-- Portable Operating System Interface (POSIX), The Open Group Base
84*86d7f5d3SJohn MarinoSpecifications Issue 6, Copyright (C) 2001-2003 by the Institute of
85*86d7f5d3SJohn MarinoElectrical and Electronics Engineers, Inc and The Open Group.
86*86d7f5d3SJohn MarinoIn the
87*86d7f5d3SJohn Marinoevent of any discrepancy between this version and the original IEEE and
88*86d7f5d3SJohn MarinoThe Open Group Standard, the original IEEE and The Open Group Standard
89*86d7f5d3SJohn Marinois the referee document.
90*86d7f5d3SJohn MarinoThe original Standard can be obtained online at
91*86d7f5d3SJohn Marinohttp://www.opengroup.org/unix/online.html .
92