Fix prototypes for preadv pwritev.
[uclibc-ng.git] / librt / mq_notify.c
blob2556669b75886dd82a340304219b72b7363eaf93
1 /*
2 * mq_notify.c - notify process that a message is available.
3 */
5 #include <errno.h>
6 #include <stddef.h>
7 #include <sys/syscall.h>
9 #include <mqueue.h>
11 #ifdef __NR_mq_notify
13 #define __NR___syscall_mq_notify __NR_mq_notify
14 static __inline__ _syscall2(int, __syscall_mq_notify, int, mqdes,
15 const void *, notification);
17 /* Register notification upon message arrival to an empty message queue */
18 int mq_notify(mqd_t mqdes, const struct sigevent *notification)
20 /* We don't support SIGEV_THREAD notification yet */
21 if (notification != NULL && notification->sigev_notify == SIGEV_THREAD) {
22 __set_errno(ENOSYS);
23 return -1;
25 return __syscall_mq_notify(mqdes, notification);
28 #endif