From patchwork Wed Sep 18 23:55:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 34582 Received: (qmail 33701 invoked by alias); 19 Sep 2019 00:00:13 -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 30242 invoked by uid 89); 19 Sep 2019 00:00:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: esa6.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1568851205; x=1600387205; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xOAv8GILM6P47t3xvcfPGH0goYtqSqVb5ED3rPYlrh0=; b=Z9xlXuiIaqxdgJEMaqxsrf130vLiP5+cXvqragyD6lDlcPbnM4v0YsOm HlQREAhmUfnu4UA8o1pYSn0+bBmkK5w9mPl40mWFZOYUoBXuz6EyTdo9m Zr/rImq2Mj7+8ECJyvrqnG8f8Vt7cWNHtNmKcMwvDOy952pS5e6C0D3Ep n0AlEg36gSZpb8/ssR6gMuLjuci2xLuZ+NhCr/toLa5vMlcrhRw3ylvmB pH+Zduo2YJV6Q6wiF95HnNcFx6EfbylQic8A6IwWlnP1HnxM7gQE7AD+b Ao3s0fnyGzQ7bmCsZCqL4+krZUrzl5GK4AbChD8LzYHvUjRYZmmKL2paV w==; IronPort-SDR: nOHqxL16Emo7Tku4Q/tjWCVh+MjMBb2q5D5fnKa5ERAXtjWjwAL/IJOyfuNvXqYPjfxalpbEND vL13oQ6qX07pZas6eF0qkpML3r6NZJKWb3XL0nyHcoQzMx5K42eaVvPAOH3/AsNvMotNZTzNZf 55YM15XA65inrhDGi2TzOD/7r9GKx0xsyMgSVMPKXoDLf4RyDmlyTfIxDg9v+hYjoBhAZ2lYiC cVNz5T+pWSgiYr7Pi28mLUh9nc6kh7tCS4bS/B/hJ6FPwRab0KfOq7d4GiGmedVqEYE1QFAd9B wmI= IronPort-SDR: RBt2BON7zv/gZwNZRUaav2YYLe3ZX1sdhTLlMstCoNMFHEqrlHGYA8DkJJPFshokCInJkzqzsG j1O2Z9+Ri+8v6vcRSjn2DIj4tEDjsWWRmnwd4UTcLBzfbWUviGTI1dBX6XSvJ82NzVjr2479cm gJy2/ajwsQCJQDPH1P25sFu3PD/dqiAKWLiCVp2HT2L1ov9vbHdVBVgIEGFih3wpYm0mvV18Mf hxCrkf7RL3ym702lYBL8JWmCi4spW4IooDQImsDOU6kgiUVkuecVsGQQZ0RlnwVR0rNUSuAV6m yPsFHUcVjGdtUX70R29BjDw4 IronPort-SDR: mhu+WuFi3NZKptP5lkF1NtwQL7QnFXWWrtlMhRLeX57TIrUK50tYRQb9FvK8wW+9vc/GejdGUj DZLS+lFssDxmzV4SQr+jWV7DXLP06yPTs4mm1wD9SL1ajPCGktrrDa2Rw2SNCoG11vcAT7QEoc /22whmGSC8924etbpqkgWwRjKYb8Kzx6fEuDPBu7F7QS+q56G2FgRtkmbpCmRjw2v9tYsFVFyQ ZeLrdqusCwELr24Ru1+dIE5VDveRlCs85GCHUBkbJdd/iLOeiGbFU0FqdSndV4h+Y3UC/TliV1 JRg= WDCIronportException: Internal From: Alistair Francis To: libc-alpha@sourceware.org Cc: alistair.francis@wdc.com, macro@wdc.com, alistair23@gmail.com Subject: [PATCH] sysdeps: Add clock_gettime64 vDSO Date: Wed, 18 Sep 2019 16:55:54 -0700 Message-Id: <20190918235554.15873-1-alistair.francis@wdc.com> MIME-Version: 1.0 Add support for the clock_gettim64 vDSO calls. 2019-09-18 Alistair Francis * sysdeps/unix/sysv/linux/init-first.c: Add clock_gettime64 vDSO. * sysdeps/unix/sysv/linux/libc-vdso.h: Likewise. --- sysdeps/unix/sysv/linux/init-first.c | 10 ++++++++++ sysdeps/unix/sysv/linux/libc-vdso.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index d90ca820be0..d005d133220 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -24,6 +24,11 @@ int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; #endif +/* vDSO symbol used on clock_gettime64 implementation. */ +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL +int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *) + attribute_hidden; +#endif /* vDSO symbol used on clock_getres implementation. */ #ifdef HAVE_CLOCK_GETRES_VSYSCALL int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *) @@ -52,6 +57,11 @@ __libc_vdso_platform_setup (void) = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME_VSYSCALL); #endif +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL + VDSO_SYMBOL(clock_gettime64) + = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME64_VSYSCALL); +#endif + #ifdef HAVE_CLOCK_GETRES_VSYSCALL VDSO_SYMBOL(clock_getres) = get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL); diff --git a/sysdeps/unix/sysv/linux/libc-vdso.h b/sysdeps/unix/sysv/linux/libc-vdso.h index 792ac39d85a..c6d505bab39 100644 --- a/sysdeps/unix/sysv/linux/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/libc-vdso.h @@ -32,6 +32,10 @@ extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; #endif +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL +extern int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *) + attribute_hidden; +#endif #ifdef HAVE_CLOCK_GETRES_VSYSCALL extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *) attribute_hidden;