From patchwork Fri Oct 25 12:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 35305 Received: (qmail 78519 invoked by alias); 25 Oct 2019 12:09:02 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 78018 invoked by uid 89); 25 Oct 2019 12:08:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qk1-f181.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AkNAYvR65lm8Jqes2Lkse7Wn0/rCmP654JpZxnf8yYk=; b=vBa+jmVo8Cmh4yWXOVCupfJUqgUmk7TbpomrSkqDNx6LuF1MmJhXZvvLFuB4mzzyiX TnW9cgXdjsl6ThUCLmqIdqWTEOggbTtgoWDAS6IJ8rPzQg46yxEToXs2IM8es0aJajZz R2AOhDiY8aBj1c12SFjpMAexLJNMFFV14Eq+BNGFYmAyUeuMhjFDhtZGkxvJmh+ku83B 3UZ7+0nmBsPYLI//fh8aE3lCICLome39hTNd3xAjMBXyvfYCeTxLNAZLgSkfLCjM/PzQ fcQHwDzN3bUVyYo7UANR8m+VnZlvIrR75ZAjobzJLcoyU/B+O5ZE0krw2an9rd0Ds8wF YxAw== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Lukasz Majewski Subject: [PATCH v2 06/11] Change most internal uses of time to __clock_gettime. Date: Fri, 25 Oct 2019 09:08:27 -0300 Message-Id: <20191025120832.27667-7-adhemerval.zanella@linaro.org> In-Reply-To: <20191025120832.27667-1-adhemerval.zanella@linaro.org> References: <20191025120832.27667-1-adhemerval.zanella@linaro.org> As for gettimeofday, time will be implemented based on clock_gettime on all platforms and internal code should use clock_gettime directly. In addition to removing a layer of indirection, this will allow us to remove the PLT-bypass gunk for gettimeofday. The changed code always assumes __clock_gettime (CLOCK_REALTIME) or __clock_gettime (CLOCK_REALTIME_COURSE) (for Linux case) cannot fail, using the same rationale for gettimeofday change. And internal helper was added (time_now). Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, powerpc64-linux-gnu, and powerpc-linux-gnu. Reviewed-by: Lukasz Majewski --- include/time.h | 11 +++- misc/syslog.c | 2 +- nscd/nscd_gethst_r.c | 2 +- nscd/nscd_helper.c | 4 +- string/strfry.c | 4 +- sysdeps/unix/sysv/linux/check_native.c | 2 +- sysdeps/unix/sysv/linux/check_pf.c | 2 +- sysdeps/unix/sysv/linux/getsysstats.c | 2 +- sysdeps/unix/sysv/linux/i386/time.c | 34 ------------ sysdeps/unix/sysv/linux/ifaddrs.c | 2 +- sysdeps/unix/sysv/linux/powerpc/time.c | 71 ++++++++------------------ sysdeps/unix/sysv/linux/x86/time.c | 34 ++++-------- time/getdate.c | 2 +- time/time.c | 1 - 14 files changed, 52 insertions(+), 121 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/i386/time.c diff --git a/include/time.h b/include/time.h index d93b16a781..3eac3dcb8d 100644 --- a/include/time.h +++ b/include/time.h @@ -7,12 +7,12 @@ # include # include