From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38367 invoked by alias); 1 Nov 2016 14:25:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 37930 invoked by uid 89); 1 Nov 2016 14:25:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ua0-f180.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=Fp221fDZ2yOEBcQ37ZMxPjqIrTtBGBUTX4gHQstw27E=; b=QRVAeQL0ho47XayOI8xtXNvQvjFoPcneAsazU+RiOvKqnE93LwHG9j10pHe8dYp1IJ I+bsm7E1KPTc8gNYS3bTIlin+bMHuhNp/gJw73+/0LkNrSRGl+iVFpnuwbDYdiXPm3J7 7OvlE6zQwBkIPz/IY4LTwF88KIkHsbgLu74ABe1AHwM5CkoyKzOXWf+tZlZUu6l6d97k vY+llp6UrveAb+SRtohUosdTQLKZQre+M0sgyTwzkmq+k9pOlddDRW7OFR6nqV+W52dH QUUi4nFEvdZKdkglQ6dhh5xb4gPLEDd6MRTyPVp7nQosEmcfgK22v43DVYEQ16O4rX/Z xhBg== X-Gm-Message-State: ABUngvfB6IBa25N3ybg42i5NpA7u/0Yk0BwbGQAvVZ0+XyEEwFLXwrSpZE6WzFqhkVz9HdGk X-Received: by 10.159.33.193 with SMTP id 59mr26785451uac.28.1478010345979; Tue, 01 Nov 2016 07:25:45 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 13/15] Use shmdt syscall for linux implementation Date: Tue, 01 Nov 2016 14:25:00 -0000 Message-Id: <1478010323-13076-14-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1478010323-13076-1-git-send-email-adhemerval.zanella@linaro.org> References: <1478010323-13076-1-git-send-email-adhemerval.zanella@linaro.org> X-SW-Source: 2016-11/txt/msg00017.txt.bz2 this patch add a direct call to shmdt syscall if it is defined by kernel headers. hecked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/shmdt.c (shmdt): Use shmdt syscall if it is defined. --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/shmdt.c | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c index 7224d6f..da5a881 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 __NR_shmdt + return INLINE_SYSCALL_CALL (shmdt, 0, 0, 0, shmaddr); +#else + return INLINE_SYSCALL_CALL (ipc, IPCOP_shmdt, 0, 0, 0, shmaddr); +#endif } -- 2.7.4