2 * mq_receive.c - functions for receiving from message queue.
7 #include <sys/syscall.h>
9 #warning FIXME: hard dependency on ADVANCED REALTIME feature
11 librt_hidden_proto(mq_timedreceive)
13 #ifndef __UCLIBC_HAS_THREADS_NATIVE__
14 #ifdef __NR_mq_timedreceive
15 #define __NR___syscall_mq_timedreceive __NR_mq_timedreceive
16 static __inline__ _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
17 char *, msg_ptr, size_t, msg_len, unsigned int *,
18 msg_prio, const void *, abs_timeout);
22 * Receive the oldest from highest priority messages.
23 * Stop waiting if abs_timeout expires.
25 ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
26 unsigned int *msg_prio,
27 const struct timespec *abs_timeout)
29 #ifdef __NR_mq_timedreceive
30 return __syscall_mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio,
38 librt_hidden_def(mq_timedreceive)
41 /* Receive the oldest from highest priority messages */
42 ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
43 unsigned int *msg_prio)
45 return mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL);