From patchwork Mon Mar 6 16:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 66039 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 660633857C55 for ; Mon, 6 Mar 2023 16:03:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 660633857C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678118632; bh=gdk1XBDu9QEtYC9/RtOSOUf4FwnzsvWhmOfK4+nnxXo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xf2NBUp5F0mOhkzO4Za2i4N0NGS1vUSny/O18LjAjgzUBmdQnFGmoHfeWk4PAOcdQ rxmpaecZj6IvvRqYMjBUMyBSno2rN05OsTwxHAW47euDEBHJlFepIRzn+5Il1luwKa u5JYaLoV8CcbRawrWshweZOBoyYYA4FnHIg0EFKI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-176d1a112bfso3038051fac.5 for ; Mon, 06 Mar 2023 08:03:28 -0800 (PST) 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) 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 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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