mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
Linux: mq_* syscall numbers are always available
Due to the built-in tables, __NR_mq_getsetattr, __NR_mq_notify, __NR_mq_open, __NR_mq_timedreceive, __NR_mq_timedsend, __NR_mq_unlink are always defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
8d25a67650
commit
276e6080c8
@ -19,8 +19,6 @@
|
||||
#include <mqueue.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_open
|
||||
|
||||
/* Removes the association between message queue descriptor MQDES and its
|
||||
message queue. */
|
||||
int
|
||||
@ -28,7 +26,3 @@ mq_close (mqd_t mqdes)
|
||||
{
|
||||
return INLINE_SYSCALL (close, 1, mqdes);
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_close.c>
|
||||
#endif
|
||||
|
@ -20,15 +20,9 @@
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_getsetattr
|
||||
|
||||
/* Query status and attributes of message queue MQDES. */
|
||||
int
|
||||
mq_getattr (mqd_t mqdes, struct mq_attr *mqstat)
|
||||
{
|
||||
return mq_setattr (mqdes, NULL, mqstat);
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_getattr.c>
|
||||
#endif
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <nptl/pthreadP.h>
|
||||
|
||||
|
||||
#ifdef __NR_mq_notify
|
||||
|
||||
/* Defined in the kernel headers: */
|
||||
#define NOTIFY_COOKIE_LEN 32 /* Length of the cookie used. */
|
||||
#define NOTIFY_WOKENUP 1 /* Code for notifcation. */
|
||||
@ -276,7 +274,3 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_notify.c>
|
||||
#endif
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include <stdio.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_open
|
||||
|
||||
/* Establish connection between a process and a message queue NAME and
|
||||
return message queue descriptor or (mqd_t) -1 on error. OFLAG determines
|
||||
the type of access used. If O_CREAT is on OFLAG, the third argument is
|
||||
@ -61,6 +59,3 @@ __mq_open_2 (const char *name, int oflag)
|
||||
|
||||
return __mq_open (name, oflag);
|
||||
}
|
||||
#else
|
||||
# include <rt/mq_open.c>
|
||||
#endif
|
||||
|
@ -20,8 +20,6 @@
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_timedreceive
|
||||
|
||||
/* Receive the oldest from highest priority messages in message queue
|
||||
MQDES. */
|
||||
ssize_t
|
||||
@ -30,7 +28,3 @@ mq_receive (mqd_t mqdes, char *msg_ptr, size_t msg_len,
|
||||
{
|
||||
return __mq_timedreceive (mqdes, msg_ptr, msg_len, msg_prio, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_receive.c>
|
||||
#endif
|
||||
|
@ -20,8 +20,6 @@
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_timedsend
|
||||
|
||||
/* Add message pointed by MSG_PTR to message queue MQDES. */
|
||||
int
|
||||
mq_send (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
|
||||
@ -29,7 +27,3 @@ mq_send (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
|
||||
{
|
||||
return __mq_timedsend (mqdes, msg_ptr, msg_len, msg_prio, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_send.c>
|
||||
#endif
|
||||
|
@ -19,8 +19,6 @@
|
||||
#include <mqueue.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifdef __NR_mq_unlink
|
||||
|
||||
/* Remove message queue named NAME. */
|
||||
int
|
||||
mq_unlink (const char *name)
|
||||
@ -42,7 +40,3 @@ mq_unlink (const char *name)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
# include <rt/mq_unlink.c>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user