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