1MQ_GETATTR(P)              POSIX Programmer's Manual             MQ_GETATTR(P)
2
3
4

NAME

6       mq_getattr - get message queue attributes (REALTIME)
7

SYNOPSIS

9       #include <mqueue.h>
10
11       int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
12
13

DESCRIPTION

15       The   mq_getattr()   function   shall  obtain  status  information  and
16       attributes of the message queue and the open message queue  description
17       associated with the message queue descriptor.
18
19       The mqdes argument specifies a message queue descriptor.
20
21       The  results  shall  be returned in the mq_attr structure referenced by
22       the mqstat argument.
23
24       Upon return, the following members shall  have  the  values  associated
25       with  the  open message queue description as set when the message queue
26       was opened and as modified by subsequent mq_setattr() calls: mq_flags.
27
28       The following attributes of the message queue shall be returned as  set
29       at message queue creation: mq_maxmsg, mq_msgsize.
30
31       Upon  return, the following members within the mq_attr structure refer‐
32       enced by the mqstat argument shall be set to the current state  of  the
33       message queue:
34
35       mq_curmsgs
36              The number of messages currently on the queue.
37
38

RETURN VALUE

40       Upon  successful  completion,  the  mq_getattr()  function shall return
41       zero. Otherwise, the function shall return -1 and set errno to indicate
42       the error.
43

ERRORS

45       The mq_getattr() function shall fail if:
46
47       EBADF  The mqdes argument is not a valid message queue descriptor.
48
49
50       The following sections are informative.
51

EXAMPLES

53       None.
54

APPLICATION USAGE

56       None.
57

RATIONALE

59       None.
60

FUTURE DIRECTIONS

62       None.
63

SEE ALSO

65       mq_open()  ,  mq_send()  ,  mq_setattr()  , mq_timedsend() , msgctl() ,
66       msgget() , msgrcv()  ,  msgsnd()  ,  the  Base  Definitions  volume  of
67       IEEE Std 1003.1-2001, <mqueue.h>
68
70       Portions  of  this text are reprinted and reproduced in electronic form
71       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
72       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
73       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
74       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
75       event of any discrepancy between this version and the original IEEE and
76       The  Open Group Standard, the original IEEE and The Open Group Standard
77       is the referee document. The original Standard can be  obtained  online
78       at http://www.opengroup.org/unix/online.html .
79
80
81
82IEEE/The Open Group                  2003                        MQ_GETATTR(P)
Impressum