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=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 A84341F463 for ; Wed, 4 Dec 2019 19:42:02 +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:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=bMLSJnaWVGlSatVB gJL2ccjagK7Myw/0stB5zPZhcK/RjZsVbA4VHmUZ9YLyQgy9x5nBoub9VSFHQMmB 1sePbCf6qmHLAFUlvA3yD8KxyPE9Fy2uU6PGfRsucpL9C6BQ0vZbTt2GBTdF0VQs 9zRA7CansrQZk6zLgmjDhCz1rzc= 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:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=I4n4r/qH15KoQ+DqcIVOXW R5Tsw=; b=eBvWouWFbx5v6odc1WWzKsABVpxPX3HXwAK4QYQqTjQpTFlbIZIo6a TuE2hszE5kCrXR9immEqR1trCv6EnaZWU6GpfVQ76dOMBwQpZMH0bMOIyXShRQ8P LnCRdRhAiHNSfrBQQd4/vCF1leo4EVvY678hiws0s8B4VgjAUGWFY= Received: (qmail 53232 invoked by alias); 4 Dec 2019 19:41:49 -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 53143 invoked by uid 89); 4 Dec 2019 19:41:49 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vs1-f65.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PCIfi1Sg3Q7XqUrlQV3CSOFM6ddNn7t8t/lpFidJnuo=; b=Jx+rHp21iOvG44HDhZqlKEsy4Trn9BpliZ6vyWwc0wQ22tzUBEF73OX3CSqD667uxe mF5dkDE83CkRNDkUNXSABbJBhyhTeYTaqJ9TuiAUYwGGxmJ5FMU/0zcWk6TEUbZdeNwe viEYCq+F4WKrQgGbV/eWSS2geamjD2ixmFjKZoHSA5rbkY32mgY3FRi/tDJPwqjOhJE1 x9aaCTYw94g4P+lKqAXXxrNwt0Nvr4AMqwj1iaM+Yfl9X+IIIZOJSzCftU82m7Jfk0W+ Fi4/I280buTJdIMEX4dv3KNM4XVRxewDTKFyE8LHPz/HXqvltgQ/mh0jAwXRqI725S6L e56g== To: Lukasz Majewski , Joseph Myers , Paul Eggert Cc: Alistair Francis , Alistair Francis , GNU C Library , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell References: <20191111214758.3677-1-lukma@denx.de> <20191111214758.3677-4-lukma@denx.de> From: Adhemerval Zanella Subject: Re: [PATCH 3/5] timer: Decouple x86_64 specific timer_settime from generic Linux implementation Message-ID: <8c7cf402-8c74-f9ed-287b-0704c8707e82@linaro.org> Date: Wed, 4 Dec 2019 16:41:40 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191111214758.3677-4-lukma@denx.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 11/11/2019 18:47, Lukasz Majewski wrote: > The x86_64 specific timer_settime implementation (from > ./linux/x86_64/timer_settime.c) reused the Linux generic one (from > ./linux/timer_settime.c) to implement handling some compatible timers > (previously defined in librt, now in libc). > > As the generic implementation now is going to also support new (available > from Linux 5.1+) timer_settime64 syscall, those two implementations have > been decoupled for easier conversion. LGTM with a nit below. Reviewed-by: Adhemerval Zanella > --- > sysdeps/unix/sysv/linux/timer_settime.c | 7 ------- > sysdeps/unix/sysv/linux/x86_64/timer_settime.c | 14 ++++++++++---- > 2 files changed, 10 insertions(+), 11 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c > index a8350aedaa..51f24200aa 100644 > --- a/sysdeps/unix/sysv/linux/timer_settime.c > +++ b/sysdeps/unix/sysv/linux/timer_settime.c > @@ -22,17 +22,10 @@ > #include > #include "kernel-posix-timers.h" > > - > -#ifdef timer_settime_alias > -# define timer_settime timer_settime_alias > -#endif > - > - > int > timer_settime (timer_t timerid, int flags, const struct itimerspec *value, > struct itimerspec *ovalue) > { > -#undef timer_settime > struct timer *kt = (struct timer *) timerid; > > /* Delete the kernel timer object. */ Ok. > diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c > index ea8978d5cd..b71a82e8cc 100644 > --- a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c > +++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c > @@ -17,13 +17,19 @@ > not, see . */ > > #include > +#include > +#include "kernel-posix-timers.h" > #include "compat-timer.h" > > +int > +__timer_settime_new (timer_t timerid, int flags, const struct itimerspec *value, > + struct itimerspec *ovalue) > +{ > + struct timer *kt = (struct timer *) timerid; > > -#define timer_settime_alias __timer_settime_new > -#include > - > -#undef timer_settime > + return INLINE_SYSCALL (timer_settime, 4, kt->ktimerid, flags, > + value, ovalue); > +} Use INLINE_SYSCALL_CALL. > versioned_symbol (librt, __timer_settime_new, timer_settime, GLIBC_2_3_3); > > >