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: 178131 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp1781403ill; Wed, 30 Oct 2019 13:25:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCQbKQNObJyN1m823DyGyr6qO1/DRNmbFYcviRtVzFSX7NWnF3jei2z/QeLCTlIRw9i1p5 X-Received: by 2002:aa7:c048:: with SMTP id k8mr1835234edo.254.1572467146549; Wed, 30 Oct 2019 13:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572467146; cv=none; d=google.com; s=arc-20160816; b=EEpNqSoAYAaCVGtfoZwkNHjAtIsWTueZID1vRtTLqzEy2b2/SButdzvx4cB+QBGtz0 Yzwqjvcnz238UbsYZhyw+sGue78XNGxg5cA4sQLjtKlmnvAcV1Kmfv/l5LCIBoJCiw9y AIHCOWjMl9FhArYhv5QX6Q+P4NQRidEXXSopN/im8cMdKhmj5PmlbzU0QwuLpv8EGge7 uOenZErju+mM/1e02D3uJMr+4LjdXkWJLi8smR2PvzwW3wq4bylSu+4JIacgpN48z6If Wv5M2TMKwaUDOxFkvutWuMSvIDNRZuMhN1gQpOiPEWdL7ONLRGvnTAEI3gMvY4GtQhXh EMmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=3hGILfN0KfC9DkAUoOVa/JT47e5nC54UijoROh/KR+E=; b=wq7eRQk+iqJqHLArYQTj0sCX3XMrFYLerslxnCSVYWpesMNnZQqj3Lke7pnczxuZxT cMTOhnvLY/6HgIOyH/+Ym8qcf8XaLQ5AFgL6NnTYjp+6mNOaDrJPhhjIE1A2htLpzEMK aCF65wkuoPnjymtvlPJ/4ih9vgZZrTC7TPEzRZBGFU2Gtmn7p+mQtN7GfVb20+ULBg8m Ele9y2R/z95wNOm9+kKBnbcRRM94M+joEU9PSjED8SV22TKp2lnqGw9WIr9IoKH4mNGB +MIK05i4ESqw7HfY6CTxwNZMck4majEDhPB4etpxU1342Pa/UtFz65kayzmqru1S/taO iVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=l6V08vpa; dkim=pass header.i=@linaro.org header.s=google header.b=ESE8yWAS; spf=pass (google.com: domain of libc-alpha-return-106483-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106483-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f12si2554705edc.1.2019.10.30.13.25.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 13:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-106483-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=l6V08vpa; dkim=pass header.i=@linaro.org header.s=google header.b=ESE8yWAS; spf=pass (google.com: domain of libc-alpha-return-106483-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106483-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=piQsjp1bKIvi6XFunre4B0RZl5F8u0SFGaryAMYsJCDN47O1I9y3D HYYcn5+YPsEOs9J6hSEdzekvRo56bmdFXOI2bLvvAxAc6zwgzGlsr8RbkyXie1HP VinQO/LdvFjGKhy9+xc1YVUvvq2gZDD9kpplnfdNup4Wix+z69Yh40= 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=l6V08vpaCZM9+OZjWpvS455W7i0B AT5sMX/0csbfaFcJq5+3W+jIWmnx/Zn/6TsXwAJUmgIRvkUkNloGrZoAFbw55dK2 gxjoB5c+OJ0Huz6dkJ/+sgU+EPTDSYCtA8uzpdxabOFIuQB+1hB3bh9F74otmain Gj6z9Yi55ZLpMEU= 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(-) -- 2.17.1 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