2 * mq_receive.c - functions for receiving from message queue.
7 #include <sys/syscall.h>
11 #ifdef __NR_mq_timedreceive
12 #define __NR___syscall_mq_timedreceive __NR_mq_timedreceive
13 static inline _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
14 char *, msg_ptr, size_t, msg_len, unsigned int *, msg_prio,
15 const void *, abs_timeout);
19 * Receive the oldest from highest priority messages.
20 * Stop waiting if abs_timeout expires.
22 ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
23 unsigned int *msg_prio,
24 const struct timespec *abs_timeout)
26 #ifdef __NR_mq_timedreceive
27 return __syscall_mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
34 /* Receive the oldest from highest priority messages */
35 ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
36 unsigned int *msg_prio)
38 return mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL);