From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117612 invoked by alias); 25 Oct 2019 11:25:53 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 117594 invoked by uid 9943); 25 Oct 2019 11:25:52 -0000 Date: Fri, 25 Oct 2019 11:25:00 -0000 Message-ID: <20191025112552.117593.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/y2038-preliminaries] Use clock_gettime to implement time. X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/y2038-preliminaries X-Git-Oldrev: 6203fd6ed5c8ed242cf7d13af7722f056207eefb X-Git-Newrev: bfc9f6179a0fdb070428010b0c5f022cca4a8c9d X-SW-Source: 2019-q4/txt/msg00134.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bfc9f6179a0fdb070428010b0c5f022cca4a8c9d commit bfc9f6179a0fdb070428010b0c5f022cca4a8c9d Author: Adhemerval Zanella Date: Thu Oct 24 17:52:30 2019 +0000 Use clock_gettime to implement time. Change the default implementation of time to call clock_gettime, to align with new Linux ports that are expected to only implement __NR_clock_gettime. Arch-specific implementation that either call the time vDSO or route to gettimeofday vDSO are not removed. Also for Linux, CLOCK_REALTIME_COARSE is used instead of generic CLOCK_REALTIME clockid. This takes less CPU time and its behavior better matches what the current glibc does. Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu. Co-authored-by: Zack Weinberg Diff: --- sysdeps/unix/sysv/linux/powerpc/time.c | 2 +- .../unix/sysv/linux/{time.c => time-internal.h} | 31 +++++----------------- sysdeps/posix/time.c => time/time-internal.h | 28 +++---------------- time/time.c | 13 +++++---- 4 files changed, 17 insertions(+), 57 deletions(-) diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c index c35b80f..e957b81 100644 --- a/sysdeps/unix/sysv/linux/powerpc/time.c +++ b/sysdeps/unix/sysv/linux/powerpc/time.c @@ -78,6 +78,6 @@ libc_hidden_def (time) #else -#include +#include