From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3149D1F45E for ; Tue, 11 Feb 2020 12:04:09 +0000 (UTC) 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:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=Z39l4Dd2fILf+qSe8nha8viuOfb6Zwx9sac7nsqhuFv W9HGicz+5S1mN3O3+rwMGHtpQ1l/nuURlUxVI9xtHn5MLPVmIkezihBU1FlKtfyo iqyqTsgazmUBa/RAHQ9Z/lF4Fqar9zzkNY+WQq1w526Ic00pLvdl/JKlr3puRxsQ = 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:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=rTMHUWyDTkMZz7gzB1azI2f0muw=; b=geyDNfQerIH2YcC3r 5iv0o07s74tItdjM8OM1wAIv9E2lk4eRfDPmLWTgn5YaPtzyZvwXVQOlgqC50K0Y jgEimmlTlVidmYSeCPswev26JdrN8KYMa02JGZZN3zXhBqe4fcw0dI4fcRF4WBWv IKtVt5b9aoFuXT4uXZY8MwDTwA= Received: (qmail 56924 invoked by alias); 11 Feb 2020 12:04:06 -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 Received: (qmail 56911 invoked by uid 89); 11 Feb 2020 12:04:06 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581422643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cOsvLVfjsdJCucVxYP+ziBitmXhPUvOHPD9OLav+HBU=; b=jU0e2bBZm9DOegiQAbHelxgU6oZA/KWTQ+tP3zsw55VwIKr26e7VvCom55Ef+idEAjyb/6 rbswhOtbV1UDNNNsPEiCGp/+oi8/MlkEa9fzUkXKwFnzzgb9KyYxseTyAr6tbMupNUrB5D PqAI52AMyVvi5mdMq8/xOhCPpgtor6k= From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 13/15] linux: Consolidate INLINE_SYSCALL References: <20200210192038.23588-1-adhemerval.zanella@linaro.org> <20200210192038.23588-13-adhemerval.zanella@linaro.org> Date: Tue, 11 Feb 2020 13:03:56 +0100 In-Reply-To: <20200210192038.23588-13-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Mon, 10 Feb 2020 16:20:36 -0300") Message-ID: <878sl9nxeb.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable * Adhemerval Zanella: > diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/s= ysdep.h > index c7f3e54d37..389c94cfda 100644 > --- a/sysdeps/unix/sysv/linux/sysdep.h > +++ b/sysdeps/unix/sysv/linux/sysdep.h > @@ -15,8 +15,44 @@ > License along with the GNU C Library; if not, see > . */ > =20 > +#ifndef _SYSDEP_LINUX_H > +#define _SYSDEP_LINUX_H > + > #include > #include > +#include > + > +#ifndef __ASSEMBLER__ > + > +#undef INTERNAL_SYSCALL_DECL > +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) I think these preprocessor directives should be indented (including most of the rest of the file). > +#undef INTERNAL_SYSCALL_ERROR_P > +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ > + ((unsigned long) (val) > -4096UL) > + > +#ifndef SYSCALL_ERROR_LABEL > +# define SYSCALL_ERROR_LABEL(sc_err)=09=09=09=09=09\ > + ({=09=09=09=09=09=09=09=09=09\ > + __set_errno (sc_err);=09=09=09=09=09=09\ > + -1L;=09=09=09=09=09=09=09=09\ > + }) > +#endif > + > +/* This version is for kernels that implement system calls that > + behave like function calls as far as register saving. */ > +#undef INLINE_SYSCALL > +#define INLINE_SYSCALL(name, nr, args...)=09=09=09=09\ > + ({=09=09=09=09=09=09=09=09=09\ > + INTERNAL_SYSCALL_DECL (sc_err);=09=09=09=09=09\ > + long int sc_ret =3D INTERNAL_SYSCALL (name, sc_err, nr, args);=09\ > + __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err))=09\ > + ? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err))=09\ > + : sc_ret;=09=09=09=09=09=09=09=09\ > + }) The comment seems misleading to me. Does =E2=80=9Cregister saving=E2=80=9D= really matter here? I think it's about the -errno behavior. I think the comment should explain how this macro is to be used (i.e., it sets errno on failure). Thanks, Florian