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: 1186937 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-106483-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="d7Ys/dNf"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ESE8yWAS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 473Khk12Dlz9sPk for ; Thu, 31 Oct 2019 07:25:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=bUfmhozPDCiz/i00n1di+JZELCJbZkc67lzyy+fitamWJGvUJ2TtI 2tGHKGFDwZqsJSNlq4cWJe5GAp3PsKeueQ6M/eBtq/vsSKvD2ZK3fKYvmoW57Y2m gTh+J8v8CwHgq4+C+7V1MRUEd3SlBKDpYnC4BCUiEj778GZvaDTEKg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=E62krEwZ1WzvzSiwMlfrkbKM/0s=; b=d7Ys/dNfaUzTwamsmjj1rzR7xnkN GA+tIBMmpfyyo1pK9gr+RzlY9rzE+iQQWbk21BxSVJW5Zny5uaD5LP5vDAtdMr17 pN1SoKrWDJyVSSLSytmLbNPIQ8TmzttJ7LqA+3uiv9S11fcMwV1Pdj+KCW1rfG+N brldr6OHnlGP1V0= 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== 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