From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by sourceware.org (Postfix) with ESMTPS id 512F53858D39 for ; Mon, 6 Mar 2023 16:03:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 512F53858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-176d1a112bfso3038051fac.5 for ; Mon, 06 Mar 2023 08:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678118607; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=gdk1XBDu9QEtYC9/RtOSOUf4FwnzsvWhmOfK4+nnxXo=; b=gUR+Plh13yIAU1/GB6Zci/HZw7Ytg97acnF30awd4HSuhRV34jbGyu4ziOemLktblw N2zc81C+9kWibBQyEVqsUC41cVkytqLYFIesk3mEoX/YtGg9c9CZNafBE5L67+xliJLe todSg38UeL2fJS3j5PKhuJ/jHX/jmYMccIAIYyiOqeZh1gR7a1rlzxjHktckDq0PMYaz /8MB77EUt7iEN3vGwpSGGp+x/8VvetlN2hMw9ie9n0x1rMQA4MFJkRKN/0H6gZ290CpD HmC3/lWhvKEqBNy3PYg9KIcQZ+1cm+Ed8SVAX7nURzjCbDQXfRBtO6kPYhofvDb+2e5q q4+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678118607; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gdk1XBDu9QEtYC9/RtOSOUf4FwnzsvWhmOfK4+nnxXo=; b=I2ORxHeQsOpRFkLkOryGyMYseavO0Z0xIdFFHKC40poCI8LDmV0EBCpNRBfsIgeaXW 5QeT1Op4sf0ZRXo4Ay5ze1S3eWxIU5Z5mDuDnbkFbk8NQm15Ax4UcIauARvlAd2KBYmI NBc8w+JMC7JxZQp3q2Ji0MAbvCO/3BydOsOF/Q075BRHhfmblEnKZQcokQ9x8MQ1U/R4 YhPe2QxKb52jkZ4wcbajjKoREOf2JFJuaBmXUEUC534yLESI9StWmYVksQPZs8VQdQPO wqSkt1bR+rftjnY/WGOWzlOcWXWZVzX11PDojeflJRLwUjq9i5DS1UYm3NbC5B9yQM/S f6SA== X-Gm-Message-State: AO0yUKUAxE2JyEagIzViHhnEEhF9jBetcD0U2eReRu4XFsO4l/z61LTQ Zqz99PON1MFwsFvyKLCDvBCmCK/eMI3i+CXCKVaERA== X-Google-Smtp-Source: AK7set8xbpKl/udP3vqPko4GCaaP22lwGkQzYMkR3l2rBW7TlQgCIlmgZHQSDB9SfApleVjmRtOGIQ== X-Received: by 2002:a05:6870:5709:b0:172:6d0c:e98c with SMTP id k9-20020a056870570900b001726d0ce98cmr5805171oap.29.1678118606760; Mon, 06 Mar 2023 08:03:26 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:d849:8c2f:e58d:3e6:9de5]) by smtp.gmail.com with ESMTPSA id m41-20020a4a952c000000b0051ff746e2b2sm4020986ooi.8.2023.03.06.08.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 08:03:26 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Bruno Haible , Florian Weimer Subject: [PATCH] time: Use CLOCK_REALTIME for time (BZ #30200) Date: Mon, 6 Mar 2023 13:03:21 -0300 Message-Id: <20230306160321.2942372-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Different than gettimeofday and timespec_get, time uses CLOCK_REALTIME_COARSE instead of CLOCK_REALTIME on Linux. The coarse time is used mostly as optimization, but it may show divergence progression due the clock resolution. For x86_64 and powerpc64, it should add slight more latency since it would call now clock_gettime internally. Checked on x86_64-linux-gnu. --- include/time.h | 5 ++- manual/time.texi | 4 +-- sysdeps/generic/time-clockid.h | 20 ------------ sysdeps/mach/hurd/bits/errno.h | 1 - sysdeps/unix/sysv/linux/dl-vdso-setup.c | 3 -- sysdeps/unix/sysv/linux/dl-vdso-setup.h | 3 -- sysdeps/unix/sysv/linux/i386/sysdep.h | 1 - sysdeps/unix/sysv/linux/powerpc/sysdep.h | 1 - sysdeps/unix/sysv/linux/powerpc/time.c | 22 ------------- sysdeps/unix/sysv/linux/time-clockid.h | 22 ------------- sysdeps/unix/sysv/linux/time.c | 41 +++--------------------- sysdeps/unix/sysv/linux/x86/time.c | 22 ------------- sysdeps/unix/sysv/linux/x86_64/sysdep.h | 1 - time/time.c | 3 +- 14 files changed, 8 insertions(+), 141 deletions(-) delete mode 100644 sysdeps/generic/time-clockid.h delete mode 100644 sysdeps/unix/sysv/linux/powerpc/time.c delete mode 100644 sysdeps/unix/sysv/linux/time-clockid.h delete mode 100644 sysdeps/unix/sysv/linux/x86/time.c diff --git a/include/time.h b/include/time.h index f599eeed4e..2b27dc87cf 100644 --- a/include/time.h +++ b/include/time.h @@ -9,7 +9,6 @@ # include # include