From patchwork Tue Nov 8 20:30:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 81408 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1743696qge; Tue, 8 Nov 2016 12:34:26 -0800 (PST) X-Received: by 10.98.31.14 with SMTP id f14mr26458128pff.27.1478637266150; Tue, 08 Nov 2016 12:34:26 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id l1si32115636pab.128.2016.11.08.12.34.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2016 12:34:26 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-74544-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-74544-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74544-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=UlyEEuY7OGXZBKsYTVGH+OppNphxNd8 VcPY4bUrKpLMgX69dIxQWvGBLSjS6gRAk+LANM+bfv4I9nINnZrmRQro8XenzHkt rboA2UzyNY+jd1V3hmQP7zuWseDLnmSHRQXVxuqHZ65N5tHFzQVrXwmjMcB9QCrD T/HXSWpob9/w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=wcroeRGeqIPq6fooVN3+eeF3vB0=; b=qxbbu diuxGxM7CnbuEYaVvSaDKe4v0Edke0f1czdyCC61kJbbvJDYJfm9cwRtRBGsyO2F lIm6OGqLbxctIzFWGzDGLxTNrZBY/2zD8RPD7PDQJAkdWFYoUOdODaaGXZqVs+ru XYS9wHFBRJginAXC/do0sc4T7giQbAyfEj9QjE= Received: (qmail 125905 invoked by alias); 8 Nov 2016 20:30:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 125538 invoked by uid 89); 8 Nov 2016 20:30:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=1612, UD:syscall.h, s39064, sk:syscall X-HELO: mail-ua0-f169.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=8PfDmgJcCgiImnH/fiHU9XXWFdHpC6hlhrJ0BB0KoOQ=; b=FEO/KIvpT0wA77o448uUDLUGviUhp9Q/1Kixt93XzvydNfhghOzKfDH2lEd6KKHLqA ACHNsHTrTPlGX6GMLEKT75sHZIe27tFC9m89peZNoFnIftrGCSPWVRT8SmeIULIsnggl WjXuCYIUrHuBHHgl1q0CxsXM8H8SbNMPUs/IZ7yz7I5/udwVNblLVyI8Q6QTX4h9DB/1 g/m9/F70O9hjm1uhNZOg0nzdEXZYBvYe4ieJz1wUszNWUPExR0QCt+boVTWwWbkU+ADo ydJORPNpgUr6WiilbwOtDv2Ny5B40mwUjXPoYGqSruikCLH0XbOylLn8Qbgg9d8MOp42 oRFw== X-Gm-Message-State: ABUngveysBk2ZkwtyLMNoRJL535ts9io6GSTInxS9txefARb7tSV8YCgdSmHvT1TMz6UC4uC X-Received: by 10.176.86.205 with SMTP id c13mr9581603uab.175.1478637037776; Tue, 08 Nov 2016 12:30:37 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v3 15/17] Use shmdt syscall for linux implementation Date: Tue, 8 Nov 2016 18:30:05 -0200 Message-Id: <1478637007-31212-16-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1478637007-31212-1-git-send-email-adhemerval.zanella@linaro.org> References: <1478637007-31212-1-git-send-email-adhemerval.zanella@linaro.org> Changes from previous version: - Remove shmdt from syscalls.list. -- this patch add a direct call to shmdt syscall if it is supported by kernel features. hecked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/alpha/syscalls.list (shmdt): Remove. * sysdeps/unix/sysv/linux/arm/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/microblaze/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/shmdt.c (shmdt): Use shmdt syscall if it is defined. --- ChangeLog | 14 ++++++++++++++ sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - sysdeps/unix/sysv/linux/arm/syscalls.list | 1 - sysdeps/unix/sysv/linux/generic/syscalls.list | 1 - sysdeps/unix/sysv/linux/hppa/syscalls.list | 1 - sysdeps/unix/sysv/linux/ia64/syscalls.list | 1 - sysdeps/unix/sysv/linux/microblaze/syscalls.list | 1 - sysdeps/unix/sysv/linux/mips/mips64/syscalls.list | 1 - sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list | 1 - sysdeps/unix/sysv/linux/shmdt.c | 12 +++++++----- sysdeps/unix/sysv/linux/x86_64/syscalls.list | 1 - 11 files changed, 21 insertions(+), 14 deletions(-) -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index bf9c8ad..096bf22 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -1,6 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget sigstack - sigstack 2 sigstack diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index f50a5cf..b1ea664 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -23,7 +23,6 @@ personality EXTRA personality Ei:i __personality personality # Semaphore and shm system calls. msgctl, shmctl, and semctl have C # wrappers (to set __IPC_64). -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget # proper socket implementations: diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list index 80244c4..51ce148 100644 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -2,7 +2,6 @@ # SysV APIs shmget - shmget i:iii __shmget shmget -shmdt - shmdt i:s __shmdt shmdt # Socket APIs socket - socket i:iii __socket socket diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index d755bfd..e75dd43 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -1,7 +1,6 @@ # File name Caller Syscall name # args Strong name Weak names # semaphore and shm system calls -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget # proper socket implementations: diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list index 90bd870..5ebade1 100644 --- a/sysdeps/unix/sysv/linux/ia64/syscalls.list +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list @@ -5,7 +5,6 @@ umount2 - umount 2 __umount2 umount2 getpriority - getpriority i:ii __getpriority getpriority # semaphore and shm system calls -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget # proper socket implementations: diff --git a/sysdeps/unix/sysv/linux/microblaze/syscalls.list b/sysdeps/unix/sysv/linux/microblaze/syscalls.list index 8b844f2..7a5666f 100644 --- a/sysdeps/unix/sysv/linux/microblaze/syscalls.list +++ b/sysdeps/unix/sysv/linux/microblaze/syscalls.list @@ -8,5 +8,4 @@ personality EXTRA personality Ei:i __personality personality # Semaphore and shm system calls. msgctl, shmctl, and semctl have C # wrappers (to set __IPC_64). -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index c6883c5..461b4ef 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -5,5 +5,4 @@ truncate - truncate i:si truncate truncate64 # Semaphore and shm system calls. msgctl, shmctl, and semctl have C # wrappers (to set __IPC_64). -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list index 4d478ce..0ccbffa 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list +++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list @@ -1,5 +1,4 @@ # File name Caller Syscall name # args Strong name Weak names # semaphore and shm system calls -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c index 7224d6f..9475161 100644 --- a/sysdeps/unix/sysv/linux/shmdt.c +++ b/sysdeps/unix/sysv/linux/shmdt.c @@ -16,12 +16,10 @@ License along with the GNU C Library; if not, see . */ -#include -#include +#include #include - #include -#include +#include /* Detach shared memory segment starting at address specified by SHMADDR from the caller's data segment. */ @@ -29,5 +27,9 @@ int shmdt (const void *shmaddr) { - return INLINE_SYSCALL (ipc, 5, IPCOP_shmdt, 0, 0, 0, (void *) shmaddr); +#ifdef __ASSUME_SYSVIPC_SYSCALL + return INLINE_SYSCALL_CALL (shmdt, shmaddr); +#else + return INLINE_SYSCALL_CALL (ipc, IPCOP_shmdt, 0, 0, 0, shmaddr); +#endif } diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list index a5db9dc..65a03ff 100644 --- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list +++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list @@ -2,7 +2,6 @@ arch_prctl EXTRA arch_prctl i:ii __arch_prctl arch_prctl modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt -shmdt - shmdt i:s __shmdt shmdt shmget - shmget i:iii __shmget shmget syscall_clock_gettime EXTRA clock_gettime Ei:ip __syscall_clock_gettime