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

  man pages->IRIX man pages -> mq_getattr (3c)              
Title
Content
Arch
Section
 

Contents


mq_getattr(3c)							mq_getattr(3c)


NAME    [Toc]    [Back]

     mq_getattr	- get attributes of a message queue

C SYNOPSIS    [Toc]    [Back]

     #include <mqueue.h>

     int mq_getattr (mqd_t mqd<b>,	struct mq_attr *mqstat<b>);

DESCRIPTION    [Toc]    [Back]

     mq_getattr	saves the attributes and status	information of the message
     queue named by mqd	into the mq_attr structure at address mqstat.  The
     following fields of the mq_attr structure are updated after a successful
     call to mq_getattr:

	long mq_flags;	      /* message queue flags */
	long mq_maxmsg;	      /* maximum number	of messages */
	long mq_msgsize;      /* maximum size of a message*/
	long mq_curmsgs;      /* number	of messages currently on queue */

     The fields	have the following meanings:

     mq_flags  The set of flags	which may be applied to	the message queue on a
	       queue descriptor	mqd basis, rather than to the queue itself.
	       The following flags are supported:

	       O_NONBLOCK If set, mq_send and mq_receive operations on the
	       queue named by mqd will not block when the queue	is full	or
	       empty, respectively.

     mq_maxmsg The maximum number of messages that can be queued at any	one
	       time.  mq_send will fail, if O_NONBLOCK flag is set, or block
	       after this many messages	are queued. This attribute of the
	       queue can be set	only at	time of	queue creation.

     mq_msgsize
	       The maximum size	of a message that can be sent to or received
	       from the	queue.	This attribute of the queue can	be set only at
	       the time	of queue creation.

     mq_curmsgs
	       The number of messages currently	on the message queue. This
	       attribute can only be queried and cannot	be explicitly set.

     mq_getattr	will fail if one or more of the	following conditions are true:

     [EBADF]	    The	message	queue descriptor, mqd, is not valid.

     [EINTR]	    A signal interrupted the mq_getattr	function call.







									Page 1






mq_getattr(3c)							mq_getattr(3c)



SEE ALSO
     mq_open(3c), intro(3c), mq_unlink(3c), mq_receive(3c), mq_send(3c),
     mq_setattr(3c), mq_notify(3c)

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned and the attributes
     of	the queue are written into the mq_attr structure pointed to by mqstat.
     Otherwise,	a value	of -1 is returned and errno is set to indicate the
     error.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
mq_setattr IRIX set attributes of a message queue
mq_getattr HP-UX get status information and attributes associated with a message queue
mq_setattr Tru64 Sets the mq_options attributes associated with a message queue (P1003.1b)
mq_getattr Tru64 Returns the status and attributes of a message queue (P1003.1b)
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)
mq_send Tru64 Places a message in the message queue (P1003.1b)
msgsnd NetBSD send a message to a message queue
msgrcv OpenBSD receive a message from a message queue
msgsnd OpenBSD send a message to a message queue
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service