19 #ifndef _XENO_POSIX_MQUEUE_H
20 #define _XENO_POSIX_MQUEUE_H
22 #if defined(__KERNEL__) || defined(__XENO_SIM__)
24 #include <nucleus/xenomai.h>
27 #include <linux/types.h>
28 #include <linux/signal.h>
29 #include <linux/fcntl.h>
33 #include <posix_overrides.h>
38 #include <xeno_config.h>
43 #if defined(__KERNEL__) || defined(__XENO_SIM__) || !defined(CONFIG_XENO_HAVE_MQUEUE_H)
46 #define MQ_PRIO_MAX 32768
50 typedef unsigned long mqd_t;
65 struct mq_attr *attr);
68 const struct mq_attr *__restrict__ attr,
69 struct mq_attr *__restrict__ oattr);
84 char *__restrict__ buffer,
86 unsigned *__restrict__ prio,
87 const struct timespec *__restrict__ timeout);
93 const struct timespec *timeout);
95 int mq_notify(mqd_t mqdes,
const struct sigevent *notification);
109 #pragma GCC system_header
111 #include_next <mqueue.h>
117 mqd_t __real_mq_open(
const char *name,
121 int __real_mq_close(mqd_t qd);
123 int __real_mq_unlink(
const char *name);
125 int __real_mq_getattr(mqd_t qd,
126 struct mq_attr *attr);
128 int __real_mq_setattr(mqd_t qd,
129 const struct mq_attr *__restrict__ attr,
130 struct mq_attr *__restrict__ oattr);
132 int __real_mq_send(mqd_t qd,
137 int __real_mq_timedsend(mqd_t q,
141 const struct timespec *timeout);
143 ssize_t __real_mq_receive(mqd_t q,
148 ssize_t __real_mq_timedreceive(mqd_t q,
149 char *__restrict__ buffer,
151 unsigned *__restrict__ prio,
152 const struct timespec *__restrict__ timeout);
154 int __real_mq_notify(mqd_t mqdes,
const struct sigevent *notification);