*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> mq_getattr (3)              



NAME    [Toc]    [Back]

       mq_getattr  -  Returns the status and attributes of a message
 queue (P1003.1b)

SYNOPSIS    [Toc]    [Back]

       #include <mqueue.h>

       int mq_getattr ( mqd_t mqdes, struct mq_attr *mqstat);

LIBRARY    [Toc]    [Back]

       Realtime Library (librt.so, librt.a)

PARAMETERS    [Toc]    [Back]

       Specifies the message queue  descriptor  whose  attributes
       are  obtained.  Specifies a pointer to a structure that is
       updated to contain the values that were set when the  message
  queue  was  created  or  modified  by  a call to the
       mq_setattr function.

       When the mq_getattr function returns, the following  three
       members  of the mq_attr structure specified by mqstat will
       have the values that were set when the message  queue  was
       created,  but  with modifications made by subsequent calls
       to the mq_setattr function: The mq_maxmsg member specifies
       the  maximum  number  of  messages that can be held in the
       queue specified by the  mqdes  argument.   The  mq_msgsize
       member  specifies  the  maximum size of any message in the
       queue.  The mq_options member specifies whether  the  message
 operation is blocking or nonblocking (MQ_NONBLOCK).

       The  mq_curmsgs  member of the mq_attr structure indicates
       the number of messages currently on the queue.

DESCRIPTION    [Toc]    [Back]

       The mq_getattr function returns the status and  attributes
       of  a  message  queue.  Use the mq_setattr function to set
       message queue attributes.

RETURN VALUES    [Toc]    [Back]

       On successful completion, the function returns the value 0
       (zero);  otherwise,  the function returns the value -1 and
       sets errno to indicate the error.

ERRORS    [Toc]    [Back]

       The mq_getattr function fails under the  following  conditions:
  The fildes argument is an invalid file descriptor.
       The mqstat argument is a null pointer.

SEE ALSO    [Toc]    [Back]

       Functions:    mq_open(3),    mq_receive(3),    mq_send(3),

       Guide to Realtime Programming

[ Back ]
 Similar pages
Name OS Title
mq_setattr Tru64 Sets the mq_options attributes associated with a message queue (P1003.1b)
mq_getattr HP-UX get status information and attributes associated with a message queue
mq_open Tru64 Establishes the connection between a message queue and a message queue descriptor (P1003.1b)
mq_receive Tru64 Receives the oldest, highest-priority message from the message queue (P1003.1b)
aio_return Tru64 Returns the status of an asynchronous I/O operation (P1003.1b)
mq_close Tru64 Closes a message queue (P1003.1b)
mq_unlink Tru64 Removes a message queue (P1003.1b)
aio_error Tru64 Returns the error status of a specified asynchronous I/O operation (P1003.1b)
mq_send Tru64 Places a message in the message queue (P1003.1b)
mq_notify Tru64 Attaches a request for asynchronous signal notification to a message queue (P1003.1b)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service