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 A1EFC1F461 for ; Wed, 17 Jul 2019 07:03:32 +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; q=dns; s=default; b=YyzuO 9K7hADtqijSdnRcM+asPhbBdSOAVhUJTts+Usztz6YRn+TiAz8u5nwA7w7YhyWIS LEQ4EvyRoyQuNmoShGwzvTW5x5D6CJdBMGDpM5D9/i4XBQ0PgZEo+yRy7rq1FEyc jUaqPM3MYpfL3E74a/DexZff0GPC/coY//xHAE= 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; s=default; bh=MGcsboGO93D erUCl/DI1eVWDmvA=; b=Aw/hHwrgESC6nb+fi4l/e9SVHUTpSQ3F7Om4S1JMVEf jui4Q7Z73MUJlB7jI4nfq0bgHtOseJ81Limx2uiE8Vi1ZFsdnS0k6PUM9y520eyC 2AM9DikaEgiHmfmltf9deeiOP1yhU1kamP2LFMhMzFVoYyTSdqWeUBvVh3dbeQdY = Received: (qmail 99656 invoked by alias); 17 Jul 2019 07:03:29 -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 99648 invoked by uid 89); 17 Jul 2019 07:03:28 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.suse.de From: Andreas Schwab To: Alistair Francis Cc: libc-alpha@sourceware.org, arnd@arndb.de, adhemerval.zanella@linaro.org, fweimer@redhat.com, palmer@sifive.com, macro@wdc.com, zongbox@gmail.com, alistair23@gmail.com Subject: Re: [RFC v3 04/23] sysdeps/clock_gettime: Use clock_gettime64 if avaliable References: <1f589e5a3fcaa4c103bc83169fffcdea9e1a6b2d.1563321715.git.alistair.francis@wdc.com> X-Yow: Now I'm concentrating on a specific tank battle toward the end of World War II! Date: Wed, 17 Jul 2019 09:03:24 +0200 In-Reply-To: <1f589e5a3fcaa4c103bc83169fffcdea9e1a6b2d.1563321715.git.alistair.francis@wdc.com> (Alistair Francis's message of "Tue, 16 Jul 2019 17:08:51 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain On Jul 16 2019, Alistair Francis wrote: > diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c > index 5fc47fb7dc..4832069c34 100644 > --- a/sysdeps/unix/sysv/linux/clock_gettime.c > +++ b/sysdeps/unix/sysv/linux/clock_gettime.c > @@ -27,10 +27,40 @@ > #include > > /* Get current value of CLOCK and store it in TP. */ > + > +#if __WORDSIZE == 32 > +int > +__clock_gettime (clockid_t clock_id, struct timespec *tp) > +{ > + int ret; > + > +#ifdef __NR_clock_gettime64 > + struct __timespec64 tp64; > + ret = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, &tp64); > + > + tp->tv_sec = tp64.tv_sec; > + tp->tv_nsec = tp64.tv_nsec; This needs to check if clock_gettime64 was successful. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."