From 356c0aabd0191cdd7287ccf1ec8bbaa4862a0823 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 25 Oct 2016 20:38:37 -0200 Subject: Consolidate Linux msgctl implementation This patch consolidates the msgctl Linux implementation in only one default file, sysdeps/unix/sysv/linux/msgctl.c. If tries to use the direct syscall if it is supported, otherwise will use the old ipc multiplex mechanism. The patch also simplify header inclusion and reorganize internal compat symbol to be built only if old ipc is defined. Checked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdeps_routines): Remove oldmsgctl. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Remove file. * sysdeps/unix/sysv/linux/arm/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/microblaze/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list (oldmsgctl): Remove. * sysdeps/unix/sysv/linux/generic/syscalls.list (msgctl): Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list (msgctl): Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list (msgctl): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (msgctl): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (msgctl): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: Use default implementation. * sysdeps/unix/sysv/linux/msgctl.c (__new_msgctl): Use msgctl syscall if defined. --- sysdeps/unix/sysv/linux/arm/msgctl.c | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/msgctl.c (limited to 'sysdeps/unix/sysv/linux/arm') diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c deleted file mode 100644 index 83c6744545..0000000000 --- a/sysdeps/unix/sysv/linux/arm/msgctl.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1995-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include -#include -#include -#include -#include - - -int -__new_msgctl (int msqid, int cmd, struct msqid_ds *buf) -{ - return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); -} - -#include -versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2); -- cgit 1.4.1