2 * mq_send.c - functions for sending to message queue.
7 #include <sys/syscall.h>
9 #warning FIXME: hard dependency on ADVANCED REALTIME feature
11 librt_hidden_proto(mq_timedsend)
13 #ifndef __UCLIBC_HAS_THREADS_NATIVE__
14 #ifdef __NR_mq_timedsend
15 #define __NR___syscall_mq_timedsend __NR_mq_timedsend
16 static __inline__ _syscall5(int, __syscall_mq_timedsend, int, mqdes,
17 const char *, msg_ptr, size_t, msg_len, unsigned int,
18 msg_prio, const void *, abs_timeout);
22 * Add a message to queue. If O_NONBLOCK is set and queue is full, wait
23 * for sufficient room in the queue until abs_timeout expires.
25 int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
26 unsigned int msg_prio, const struct timespec *abs_timeout)
28 #ifdef __NR_mq_timedsend
29 return __syscall_mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio,
37 librt_hidden_def(mq_timedsend)
40 /* Add a message to queue */
41 int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
42 unsigned int msg_prio)
44 return mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);