From patchwork Tue Nov 1 14:25:12 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: 80361 Delivered-To: patch@linaro.org Received: by 10.80.142.83 with SMTP id 19csp678136edx; Tue, 1 Nov 2016 07:27:15 -0700 (PDT) X-Received: by 10.98.90.135 with SMTP id o129mr59991834pfb.81.1478010435206; Tue, 01 Nov 2016 07:27:15 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n187si30835404pgn.87.2016.11.01.07.27.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2016 07:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-74264-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-74264-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74264-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=oXsfBjncBU/ZX9sqIq6NMiX9Wx0jf5p ShVsSgV1aDXBDq1nKqRSm8XLmMCHpzOVS9xps4xL661itGQtmGbtIPR/gFh2OUOn WfHtU0V+gPXv8AzfMT3d7hB+wS0gh9SP2vGPBDh3rynP70IyG42vpF8Azeg6apkU PHWvhK2dSqmQ= 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=n/SOP8AmlVxssWUESm3u3FDFZBI=; b=iBw/T uHBR+wFxNHbSljCPKztfSsvBekzS/Dg2u+tkTYYFU++g63zh4CrD6PnsvdjcAiyf N5g6kMdHo9PdM8x+7D12nTVVoGH48bueVDoGCRwXAvbLvLg1gZbXY1rJ1MK8nDdT TloYcazX4Mnfjtm+MZCMdWKgIYvoNDaCCkIUQk= Received: (qmail 36915 invoked by alias); 1 Nov 2016 14:25:46 -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 36383 invoked by uid 89); 1 Nov 2016 14:25:44 -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=KEY, Hx-languages-length:1310, HX-Gm-Message-State:ABUngvf X-HELO: mail-ua0-f173.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=JrEzQ2A4QbqgHePRb72C4ghqmeXtnhGGn4NTof7H69U=; b=HO5l+QAJ5FlwMzwZYnsNPJKXFeIybwBmWGT3c8SV+4Bad+X4SMCRNL8JCyPaGDF9Pn gK5UJ46ZzwWx7pNjUuqGKa/PUQF5rCBUb8c2kEz3jaPP7jyudiTdsl0qBtF9QD4WeV9M 1dGQrphLZFeqgx1i2k/URBPw4nXtDR+meocLymq9g9RZyRsLEQNa6ROiJb2t0QTmOXmH tU4mkxidtYkM9RGQ0gGBLXZKs6f0lCWfs6PV3bx91/uwZoMObSSuavZMwVDCd3o3L13K kU3qeBExzQihhLeDn2JjLq5chRx+x+gDL99Ol2FM7XwFTuUErZ5LFxohmQT0FtLPUwg8 n/TQ== X-Gm-Message-State: ABUngvf+G4Sfo0gVTOrx2oZlqkFrvI8Wlc5vLJXheDu4z1lNRd1RFJAcHjUzZ0DKitRVi8QS X-Received: by 10.176.84.7 with SMTP id n7mr16465529uaa.30.1478010335228; Tue, 01 Nov 2016 07:25:35 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 04/15] Use msgget syscall for Linux implementation Date: Tue, 1 Nov 2016 12:25:12 -0200 Message-Id: <1478010323-13076-5-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> This patch add a direct call to msgget syscall if it is defined by kernel headers. hecked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/msgget.c (msgget): Use msgget syscall if define. --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/msgget.c | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/msgget.c b/sysdeps/unix/sysv/linux/msgget.c index ef98c75..07da793 100644 --- a/sysdeps/unix/sysv/linux/msgget.c +++ b/sysdeps/unix/sysv/linux/msgget.c @@ -16,13 +16,10 @@ License along with the GNU C Library; if not, see . */ -#include #include #include -#include /* for definition of NULL */ - #include -#include +#include /* Return descriptor for message queue associated with KEY. The MSGFLG parameter describes how to proceed with clashing of key values. */ @@ -30,5 +27,9 @@ int msgget (key_t key, int msgflg) { - return INLINE_SYSCALL (ipc, 5, IPCOP_msgget, key, msgflg, 0, NULL); +#ifdef __NR_msgget + return INLINE_SYSCALL_CALL (msgget, key, msgflg); +#else + return INLINE_SYSCALL_CALL (ipc, IPCOP_msgget, key, msgflg, 0, NULL); +#endif }