public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Linux: mq_* syscall numbers are always available
@ 2020-03-03 13:26 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2020-03-03 13:26 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=276e6080c8646c7f8a9139da8028f25c80d8bdca
commit 276e6080c8646c7f8a9139da8028f25c80d8bdca
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue Mar 3 12:11:49 2020 +0100
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>
Diff:
---
sysdeps/unix/sysv/linux/mq_close.c | 6 ------
sysdeps/unix/sysv/linux/mq_getattr.c | 6 ------
sysdeps/unix/sysv/linux/mq_notify.c | 6 ------
sysdeps/unix/sysv/linux/mq_open.c | 5 -----
sysdeps/unix/sysv/linux/mq_receive.c | 6 ------
sysdeps/unix/sysv/linux/mq_send.c | 6 ------
sysdeps/unix/sysv/linux/mq_unlink.c | 6 ------
7 files changed, 41 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/mq_close.c b/sysdeps/unix/sysv/linux/mq_close.c
index 6990182..e1b4898 100644
--- a/sysdeps/unix/sysv/linux/mq_close.c
+++ b/sysdeps/unix/sysv/linux/mq_close.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_getattr.c b/sysdeps/unix/sysv/linux/mq_getattr.c
index a8a17fd..dc8acc5 100644
--- a/sysdeps/unix/sysv/linux/mq_getattr.c
+++ b/sysdeps/unix/sysv/linux/mq_getattr.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
index f288bac..61bbb03 100644
--- a/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/sysdeps/unix/sysv/linux/mq_notify.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_open.c b/sysdeps/unix/sysv/linux/mq_open.c
index ebb1bfc..c88dc58 100644
--- a/sysdeps/unix/sysv/linux/mq_open.c
+++ b/sysdeps/unix/sysv/linux/mq_open.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_receive.c b/sysdeps/unix/sysv/linux/mq_receive.c
index 5292c98..282f486 100644
--- a/sysdeps/unix/sysv/linux/mq_receive.c
+++ b/sysdeps/unix/sysv/linux/mq_receive.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_send.c b/sysdeps/unix/sysv/linux/mq_send.c
index 8e297e6..38f320d 100644
--- a/sysdeps/unix/sysv/linux/mq_send.c
+++ b/sysdeps/unix/sysv/linux/mq_send.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/mq_unlink.c b/sysdeps/unix/sysv/linux/mq_unlink.c
index 4ea882d..85fb5d0 100644
--- a/sysdeps/unix/sysv/linux/mq_unlink.c
+++ b/sysdeps/unix/sysv/linux/mq_unlink.c
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-03 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 13:26 [glibc] Linux: mq_* syscall numbers are always available Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).