From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116501 invoked by alias); 3 Nov 2016 20:27:08 -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 116489 invoked by uid 89); 3 Nov 2016 20:27:07 -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=Hx-languages-length:1810 X-HELO: mail-vk0-f51.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=L9+KjyWCHjjqCkRu2DmPiCNNPKK0FaYpWFxVPWJfwWQ=; b=g5xwgdofqwQZjZYAJZKdd9oZCvtnydeg2wuGFRGRRJgXZHQI1oRrMbN04ytdcGFvWg XD2OFBI2YuchBbhwXoUZ/mQBQgxCdKP90nlfy83/1tQqLskPXyL1Dfqu6SaLr0k287Gr /fqd7icJ9OSwNkDvkTHBB4qbyZphhEpn8sOjNCtLBowNiEWIo5mKP2uv/WurXZFpIleu qbhprgtbUeFeIJNYKk7OxBX9VlpPOdxpUS4g4sz2NvRjsVU+tCd9MxI4vVHfnwUZafFf pML0cJylzDVWueqyFEdN353ZDp1OQjJ/UrfKt6BcDl8iJWd3XfBI9nLzxhz9Qzwer/gW mWJA== X-Gm-Message-State: ABUngvcCH06J4BFQdCSGhE7O7IzFiAdhJp4YIYG08/wcbShx3yPm+g5gRqvxIRmT05EwHCcE X-Received: by 10.31.114.207 with SMTP id n198mr9375129vkc.129.1478204816040; Thu, 03 Nov 2016 13:26:56 -0700 (PDT) Subject: Re: [PATCH v2 04/16] Use msgsnd syscall for Linux implementation To: Yury Norov References: <1478114813-3526-1-git-send-email-adhemerval.zanella@linaro.org> <1478114813-3526-5-git-send-email-adhemerval.zanella@linaro.org> <20161103141435.GA3348@yury-N73SV> Cc: libc-alpha@sourceware.org From: Adhemerval Zanella Message-ID: Date: Thu, 03 Nov 2016 20:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161103141435.GA3348@yury-N73SV> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-11/txt/msg00119.txt.bz2 On 03/11/2016 12:14, Yury Norov wrote: > Hi Adhemerval, > > On Wed, Nov 02, 2016 at 05:26:41PM -0200, Adhemerval Zanella wrote: >> 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. > > Typo? Yeap, it is suppose to be 'Checked'. > >> >> * 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(-) >> >> 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 > > IIUC, ipc_priv.h is only needed if__ASSUME_SYSVIPC_SYSCALL is not > defined. > > Is sys/msg.h needed for __ASSUME_SYSVIPC_SYSCALL only? If so, it's > better to #include kernel-features.h instead. > > The same for other patches of series. I see it would be simpler and usual to just include 'ipc_priv.h' regardless instead of adding inside the if '__ASSUME_SYSVIPC_SYSCALL' brackets. And although 'sys/msg.h' is not really required for this specific file (since we are defining __libc_msgsnd and adding an alias), I also think it is better to add the header for consistency.