Copyright (c) 2005 David Xu <davidxu@FreeBSD.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice(s), this list of conditions and the following disclaimer as the first lines of this file unmodified other than the possible addition of one or more copyright notices. 2. Redistributions in b...
NAMEmq_getattr - get message queue attributes (REALTIME)
SYNOPSISIn mqueue.h Ft int Fn mq_getattr mqd_t mqdes struct mq_attr *mqstat
DESCRIPTIONThe Fn mq_getattr system call obtains status information and attributes of the message queue and the open message queue description associated with the message queue descriptor.
The Fa mqdes argument specifies a message queue descriptor.
The results are returned in the Vt mq_attr structure referenced by the Fa mqstat argument.
Upon return, the following members will have the values associated with the open message queue description as set when the message queue was opened and as modified by subsequent Fn mq_setattr calls: mq_flags
The following attributes of the message queue will be returned as set at message queue creation: mq_maxmsg , mq_msgsize
Upon return, the following members within the Vt mq_attr structure referenced by the Fa mqstat argument will be set to the current state of the message queue:
- The number of messages currently on the queue.
RETURN VALUESRv -std
ERRORSThe Fn mq_getattr system call will fail if:
- Bq Er EBADF
- The Fa mqdes argument is not a valid message queue descriptor.