From patchwork Wed Nov 2 19:26:41 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: 80534 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp291437qge; Wed, 2 Nov 2016 12:28:18 -0700 (PDT) X-Received: by 10.99.217.21 with SMTP id r21mr7980908pgg.78.1478114898323; Wed, 02 Nov 2016 12:28:18 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id w20si4723989pgj.210.2016.11.02.12.28.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Nov 2016 12:28:18 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-74320-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-74320-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74320-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=tv66nYxkrGvVIsxq92sToZDMqqqfnBy W9OwhvN1pUtQE7rWO5Oer05aOfTQorJt+bgpFRPftuzt2iQo9KWwUQw/YwAndu/Z nl/oJkjNHdIpuSxQKqL1kmW3JUXmx1NddjBf6NSgmSSmqj6/TPlOQv/CcYQ18zGo j9XW/RQ1vVJU= 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=VZygLsnFEb+9SCBl6bnvAf04M0I=; b=NrXTO UqBJP+ausgecmpFrkRJ0JGbhMmCReZqWPvnsQo+Q8+QMZWMfMBWTKNTqzuPzfHaj /6AASSY9OMD1MWBr1aR3yyEnzrJIIAg7xp031i93EJSFwmxle8FNbjc0hWzietdK Ne3h4yAoyM/lOPF8LyqkdhtqgGQOxFcGBgl0+4= Received: (qmail 64489 invoked by alias); 2 Nov 2016 19:27:17 -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 64257 invoked by uid 89); 2 Nov 2016 19:27:15 -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=H*MI:sk:1478114 X-HELO: mail-vk0-f49.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=hhewyBzu17nCPoFEr9hbgC9t7K7q2udOd8MqeQxn4is=; b=OP/dZ9JTCM0bomDa3+6ErDMVYEw9d4i9eN+RPCnIPnyIEPUPjhGVM1VGD0zYirF+zL UZ2/3qQuKS9Wlz6FodPgFsD+oLmf+kMwDQX2VnjOVSQ0xRbbjj2qvGnFU+6hi7cB0mwm xktORubwtCLQZ7NEGFSeeRFNYWl5Ru+OQcroMvUFdunQxEk5dejS3SYcU3arzNet0eaN WAfXl8ONVFsRILaC5h5zse9u4Mmfz6IQYgnOtUTDoL1S7eLTbqKpvtPMCWnDWsQUUhTA 1RsMhgOF3cLxOHjrWe6HWJD09tfHcru5P+ktzvEfLWMFT2N2MTU6qJ4kq+GkDc7m8at2 fJGA== X-Gm-Message-State: ABUngvdOLiSZajde2HjBUFjqBo9Ns+hXPg0Pc+G+w9I/YYUgbBuSwyuCiVxCqDTr9cQOoDlU X-Received: by 10.31.202.193 with SMTP id a184mr3803729vkg.134.1478114826093; Wed, 02 Nov 2016 12:27:06 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 04/16] Use msgsnd syscall for Linux implementation Date: Wed, 2 Nov 2016 17:26:41 -0200 Message-Id: <1478114813-3526-5-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1478114813-3526-1-git-send-email-adhemerval.zanella@linaro.org> References: <1478114813-3526-1-git-send-email-adhemerval.zanella@linaro.org> Changes from previous version: - Use __ASSUME_SYSVIPC_SYSCALL instead of __NR_syscall to issue the wired syscall or the ipc one. -- This patch add a direct call to msgsnd syscall if it is supported by kernel features. 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..4ed3a64 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 __ASSUME_SYSVIPC_SYSCALL + 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)