mq_getattr()

get message queue attributes 

Realtime Function


SYNOPSIS

#include <mqueue.h>

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


DESCRIPTION

The mq_getattr() function retrieves status information and attributes of the message queue and the open message queue description identified by the specified message queue descriptor, mqdes. It stores the retrieved information in in the mq_attr structure pointed to by mqstat.

After returning from a mq_getattr() call, the following members of the mq_attr structure are set as described:

mq_flags 

Contains the value associated with the open message queue description when it was open and subsequently modified by calls to the mq_setattr() function.

mq_maxmsg 
mq_msgsize 

Contain the values of these attributes as set when the message quue was created.

mq_curmsgs 

Contains the number of messages currently on the message queue.


PARAMETERS

mqdes 

Specifies a message queue descriptor.

mqstat 

Points to a mq_attr structure where the retrieved values are stored.


RETURN VALUES

On success, mq_getattr() returns 0. On failure, it returns -1 and sets errno to one of the following:

EBADF 

mqdes is not a valid message queue descriptor.


CONFORMANCE

UNIX 03.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
mq_open(), mq_send(), mq_setattr(), mq_timedsend(), msgctl(), msgget(), msgrcv(), msgsnd()


PTC MKS Toolkit 10.4 Documentation Build 39.