From patchwork Wed Oct 30 20:25:17 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: 35485 Received: (qmail 12988 invoked by alias); 30 Oct 2019 20:25:33 -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 12798 invoked by uid 89); 30 Oct 2019 20:25:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=alarm X-HELO: mail-qk1-f194.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; bh=3hGILfN0KfC9DkAUoOVa/JT47e5nC54UijoROh/KR+E=; b=ESE8yWAS3FnfP3yA+FVUu+m5g/11n2JivCg+Ve3nWz4JNxwmRpmmRZVkJWBBiwQ2SH qef67s2B7vAMy7hhqIUkkxSFlwfgenypUbamZqXspZJBTcUrl27fsnbcFYoA4Y8iNGnf UdEm9VsglT/sFv9tGdRwV0HcpasHunqE06t/uIB2NkjyIPuFvGEuucMjf2rQAgZ2LCJm 5MY4WVHfV/GTDWsv38Xl/pVRBt8kVP1C845ks4cRfa29BMBo/azj4jsKc8y2VVq2b8Gk O/XqjXdjgV/oX1kKO2lD4RgeIEEWw8kTqvDwLOm5q3MprIzEt1ZQzW4X+n4cO8yrNpJN Ze6w== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis Subject: [PATCH] Refactor adjtimex based on clock_adjtime Date: Wed, 30 Oct 2019 17:25:17 -0300 Message-Id: <20191030202517.4805-1-adhemerval.zanella@linaro.org> Checked on x86_64-linux-gnu. --- include/time.h | 5 +++++ sysdeps/unix/sysv/linux/adjtimex.c | 2 +- sysdeps/unix/sysv/linux/syscalls.list | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/time.h b/include/time.h index caf562a380..000672e3bc 100644 --- a/include/time.h +++ b/include/time.h @@ -25,6 +25,11 @@ libc_hidden_proto (__clock_gettime) extern __typeof (clock_settime) __clock_settime; libc_hidden_proto (__clock_settime) +#ifdef __linux__ +extern __typeof (clock_adjtime) __clock_adjtime; +libc_hidden_proto (__clock_adjtime); +#endif + /* Now define the internal interfaces. */ struct tm; diff --git a/sysdeps/unix/sysv/linux/adjtimex.c b/sysdeps/unix/sysv/linux/adjtimex.c index 6d62c72a17..95be503109 100644 --- a/sysdeps/unix/sysv/linux/adjtimex.c +++ b/sysdeps/unix/sysv/linux/adjtimex.c @@ -22,7 +22,7 @@ int ___adjtimex (struct timex *buf) { - return INLINE_SYSCALL_CALL (adjtimex, buf); + return __clock_adjtime (CLOCK_REALTIME, buf); } #ifdef VERSION_adjtimex diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 70b110979b..603e517ca6 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -4,7 +4,7 @@ alarm - alarm i:i alarm bdflush EXTRA bdflush i:ii __compat_bdflush bdflush@GLIBC_2.0:GLIBC_2.23 capget EXTRA capget i:pp capget capset EXTRA capset i:pp capset -clock_adjtime EXTRA clock_adjtime i:ip clock_adjtime +clock_adjtime EXTRA clock_adjtime i:ip __clock_adjtime clock_adjtime create_module EXTRA create_module 3 __compat_create_module create_module@GLIBC_2.0:GLIBC_2.23 delete_module EXTRA delete_module 3 delete_module epoll_create EXTRA epoll_create i:i epoll_create