2 * mq_send.c - functions for sending to message queue.
7 #include <sys/syscall.h>
10 librt_hidden_proto(mq_timedsend)
12 #ifdef __NR_mq_timedsend
13 #define __NR___syscall_mq_timedsend __NR_mq_timedsend
14 static inline _syscall5(int, __syscall_mq_timedsend, int, mqdes,
15 const char *, msg_ptr, size_t, msg_len, unsigned int, msg_prio,
16 const void *, abs_timeout);
20 * Add a message to queue. If O_NONBLOCK is set and queue is full, wait
21 * for sufficient room in the queue until abs_timeout expires.
23 int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
24 unsigned int msg_prio,
25 const struct timespec *abs_timeout)
27 #ifdef __NR_mq_timedsend
28 return __syscall_mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
34 librt_hidden_def(mq_timedsend)
36 /* Add a message to queue */
37 int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
38 unsigned int msg_prio)
40 return mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);