This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 09/16] Use semop syscall for Linux implementation

Changes from previous version:

  - Use __ASSUME_SYSVIPC_SYSCALL instead of __NR_syscall to issue the
    wired syscall or the ipc one.


This patch add a direct call to semop syscall if it is supported by
kernel headers.

Checked on x86_64, i686, powerpc64le, aarch64, and armhf.

	* sysdeps/unix/sysv/linux/semop.c (semop): Use semop syscall if it is
 ChangeLog                       |  3 +++
 sysdeps/unix/sysv/linux/semop.c | 10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
index 593eb4c..bd57009 100644
--- a/sysdeps/unix/sysv/linux/semop.c
+++ b/sysdeps/unix/sysv/linux/semop.c
@@ -16,17 +16,19 @@
    License along with the GNU C Library; if not, see
    <>.  */
-#include <errno.h>
 #include <sys/sem.h>
 #include <ipc_priv.h>
 #include <sysdep.h>
-#include <sys/syscall.h>
+#include <errno.h>
 /* Perform user-defined atomical operation of array of semaphores.  */
 semop (int semid, struct sembuf *sops, size_t nsops)
-  return INLINE_SYSCALL (ipc, 5, IPCOP_semop, semid, (int) nsops, 0, sops);
+  return INLINE_SYSCALL_CALL (semop, semid, sops, nsops);
+  return INLINE_SYSCALL_CALL (ipc, IPCOP_semop, semid, nsops, 0, sops);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]