From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79936 invoked by alias); 21 Sep 2016 19:22:58 -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 79922 invoked by uid 89); 21 Sep 2016 19:22:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=SYSCALL_CANCEL, __syscall_nargs, __SYSCALL_NARGS, syscall_cancel X-HELO: albireo.enyo.de From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 1/4] Add INTERNAL_SYSCALL_CALL References: <1474383714-15187-1-git-send-email-adhemerval.zanella@linaro.org> <1474383714-15187-2-git-send-email-adhemerval.zanella@linaro.org> <87h99amey7.fsf@mid.deneb.enyo.de> <89560945-9ba0-395a-3829-bb0eae62affb@linaro.org> Date: Wed, 21 Sep 2016 19:22:00 -0000 In-Reply-To: <89560945-9ba0-395a-3829-bb0eae62affb@linaro.org> (Adhemerval Zanella's message of "Wed, 21 Sep 2016 15:00:16 -0300") Message-ID: <87k2e5gir6.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-09/txt/msg00422.txt.bz2 * Adhemerval Zanella: > On 20/09/2016 18:36, Florian Weimer wrote: >> * Adhemerval Zanella: >> >>> +#define __INTERNAL_SYSCALL0(name, err) \ >>> + INTERNAL_SYSCALL (name, err, 0) >>> +#define __INTERNAL_SYSCALL1(name, err, a1) \ >>> + INTERNAL_SYSCALL (name, err, 1, a1) >>> +#define __INTERNAL_SYSCALL2(name, err, a1, a2) \ >>> + INTERNAL_SYSCALL (name, err, 2, a1, a2) >>> +#define __INTERNAL_SYSCALL3(name, err, a1, a2, a3) \ >>> + INTERNAL_SYSCALL (name, err, 3, a1, a2, a3) >>> +#define __INTERNAL_SYSCALL4(name, err, a1, a2, a3, a4) \ >>> + INTERNAL_SYSCALL (name, err, 4, a1, a2, a3, a4) >>> +#define __INTERNAL_SYSCALL5(name, err, a1, a2, a3, a4, a5) \ >>> + INTERNAL_SYSCALL (name, err, 5, a1, a2, a3, a4, a5) >>> +#define __INTERNAL_SYSCALL6(name, err, a1, a2, a3, a4, a5, a6) \ >>> + INTERNAL_SYSCALL (name, err, 6, a1, a2, a3, a4, a5, a6) >>> +#define __INTERNAL_SYSCALL7(name, err, a1, a2, a3, a4, a5, a6, a7) \ >>> + INTERNAL_SYSCALL (name, err, 7, a1, a2, a3, a4, a5, a6, a7) >> >> It's not immediately obvious why these definitions are needed. > > I agree this is not obvious, but it follows the SYSCALL_CANCEL macro logic > where __INTERNAL_SYSCALL_DISP will select the correct __INTERNAL_SYSCALL > (based on number of arguments). Is there anything that overrides inidivdual __INTERNAL_SYSCALLx macros? What I mean is this: Why can't this +#define __INTERNAL_SYSCALL_DISP(b,err,...) \ + __INTERNAL_SYSCALL_CONCAT (b, __SYSCALL_NARGS (__VA_ARGS__)) \ + (err, __VA_ARGS__) turn into +#define __INTERNAL_SYSCALL_DISP(b,err,...) \ + INTERNAL_SYSCALL (b, err, __SYSCALL_NARGS (__VA_ARGS__), __VA_ARGS__) ?