From patchwork Tue Nov 1 14:25:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 80357 Delivered-To: patch@linaro.org Received: by 10.80.142.83 with SMTP id 19csp677797edx; Tue, 1 Nov 2016 07:26:32 -0700 (PDT) X-Received: by 10.99.178.89 with SMTP id t25mr28023587pgo.131.1478010392412; Tue, 01 Nov 2016 07:26:32 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id b28si30744731pfe.40.2016.11.01.07.26.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2016 07:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-74260-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-74260-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74260-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=T9/JdpIGdLgmoLQkXWgsNtSdRASYrqJ H+fIzmTv0ZHyGjJXNL3Lpq3ElR9ZjfAF81fUB0/6zhF36wbDLDDqXvl3SmodHO/9 7yCu+wrNssjSfvLukMyJZmRrErIUlsPMfbofX3GucFVrpwPhASca334ZpFVwn7KI b9Fb0ugp0szw= 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=vIxnzI+/m4/QzbPAQyHG+9YLHy0=; b=ldNyD ayBS+cWXhIFpEB+dnXZ5v/PMigljmTtJFVEnGN1/loFvgLIH5SM5HVN5V+dqg/nS tlQmDbwcPZ69VWXQ+jnwmdHxdYWXSzQG4BwD0u1DX47Lra4r3cBuMbC4L82ycB9m Yd6lZgYbezz7NdzRO4o1I8l5oGN0K8MY60DFb4= Received: (qmail 36564 invoked by alias); 1 Nov 2016 14:25:45 -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 36401 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=1617 X-HELO: mail-vk0-f41.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=S/SHMyOyGl0mNra3wXe/RURcBSH0ZL6rHQjyujtzkqM=; b=Uo4FVgUEnuQalyOu+9Ie6bhnD3XF89IktvRjrYC2GMGb4p0aqA6zPwfvi4GU4hDann FWjKFEe9ywqrGF3iga32eHb/xvCwSueLOoeOjNGJSh+XS8UyCgiuE92GxpPXNSypWs+A D26DQ+wbETA7F5mUSKF6jWgSVQ+7FZ6f5L/SMRWaqnIMU+2o60d/qvrqzAdFF0eETE5k +gRcm+M3ixaIDCKrQNGtjiOs2nQaatycljZZljzugO0U3f69pwKY76pNaphmlzkgk7xS dXULs9lhdscwCxRT+7ZC6iqyra8SiVg2PB0g/Qo8oxExkO3dcs7no0xusg0Jh7CCzgdz hx/A== X-Gm-Message-State: ABUngvcZCPkAlRhWcGQj+pEZfJx8hGHvU8km3kEMsoHcP80yc6UIie0sBLrjrnd7GOhJGKAy X-Received: by 10.31.156.205 with SMTP id f196mr24304174vke.45.1478010333993; Tue, 01 Nov 2016 07:25:33 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 03/15] Use msgsnd syscall for Linux implementation Date: Tue, 1 Nov 2016 12:25:11 -0200 Message-Id: <1478010323-13076-4-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 msgsnd syscall if it is defined by kernel headers. hecked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Use msgsnd syscall if defined. --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/msgsnd.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c index 1457e43..2928493 100644 --- a/sysdeps/unix/sysv/linux/msgsnd.c +++ b/sysdeps/unix/sysv/linux/msgsnd.c @@ -16,17 +16,18 @@ License along with the GNU C Library; if not, see . */ -#include #include #include - #include -#include int __libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) { +#ifdef __NR_msgsnd + return SYSCALL_CANCEL (msgsnd, msqid, msgp, msgsz, msgflg); +#else return SYSCALL_CANCEL (ipc, IPCOP_msgsnd, msqid, msgsz, msgflg, (void *) msgp); +#endif } weak_alias (__libc_msgsnd, msgsnd)