RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Message Passing Manager mq_getattr - Get Message Queue Attributes

PREV UP next Bookshelf RTEMS POSIX API User's Guide

16.4.8: mq_getattr - Get Message Queue Attributes

CALLING SEQUENCE:

#include <mqueue.h>
int mq_getattr(
  mqd_t mqdes,
  struct mq_attr *mqstat
);

STATUS CODES:

EBADF - The message queue descriptor does not refer to a valid, open message queue.

DESCRIPTION:

The mqdes argument specifies a message queue descriptor. The mq_getattr function is used to get status information and attributes of the message queue associated with the message queue descriptor. The results are returned in the mq_attr structure referenced by the mqstat argument. All of these attributes are set at create time, except the blocking/non-blocking behavior of the message queue which can be dynamically set by using mq_setattr. The attribute mq_curmsg is set to reflect the number of messages on the queue at the time that mq_getattr was called.

Upon successful completion, the mq_getattr function returns zero. Otherwise, the function returns -1 and sets errno to indicate the error.

NOTES:


PREV UP next Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation