arm: allow to build with DODEBUG=y
[uclibc-ng.git] / librt / mq_getsetattr.c
blobb50d9a974f62cf1696a0c80e68b4160fb5ca62b3
1 /*
2 * mq_getattr.c - get message queue attributes.
3 */
5 #include <errno.h>
6 #include <stddef.h>
7 #include <sys/syscall.h>
9 #include <mqueue.h>
11 #ifdef __NR_mq_getsetattr
13 librt_hidden_proto(mq_setattr)
14 #define __NR___syscall_mq_getsetattr __NR_mq_getsetattr
15 static __inline__ _syscall3(int, __syscall_mq_getsetattr, int, mqdes,
16 const void *, mqstat, void *, omqstat);
19 * Set attributes associated with message queue (and possibly also get
20 * its old attributes)
22 int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
23 struct mq_attr *omqstat)
25 return __syscall_mq_getsetattr(mqdes, mqstat, omqstat);
28 librt_hidden_def(mq_setattr)
30 /* Query status and attributes of message queue */
31 int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat)
33 return mq_setattr(mqdes, NULL, mqstat);
36 #endif