From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59516 invoked by alias); 21 Feb 2020 10:03:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 59504 invoked by uid 89); 21 Feb 2020 10:03:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy= X-HELO: mail-out.m-online.net Date: Fri, 21 Feb 2020 10:03:00 -0000 From: Lukasz Majewski To: Alistair Francis Cc: libc-alpha@sourceware.org, alistair23@gmail.com Subject: Re: [PATCH v4 5/8] linux: Use long time_t __getitimer/__setitimer Message-ID: <20200221110333.68cdd2b9@jawa> In-Reply-To: <20200219181057.10297-6-alistair.francis@wdc.com> References: <20200219181057.10297-1-alistair.francis@wdc.com> <20200219181057.10297-6-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/PW4nfDyof3piJO.rcG8xKYz"; protocol="application/pgp-signature" X-SW-Source: 2020-02/txt/msg00907.txt.bz2 --Sig_/PW4nfDyof3piJO.rcG8xKYz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-length: 10602 Hi Alistair, > The Linux kernel expects itimerval to use a 32-bit time_t, even on > archs with a 64-bit time_t (like RV32). To address this let's convert > itimerval to/from 32-bit and 64-bit to ensure the kernel always gets > a 32-bit time_t. >=20 > While we are converting these functions let's also convert them to be > the y2038 safe versions. This means there is a *64 function that is > called by a backwards compatible wrapper. > --- > include/time.h | 15 +++++ > sysdeps/unix/syscalls.list | 2 - > sysdeps/unix/sysv/linux/getitimer.c | 59 +++++++++++++++++ > sysdeps/unix/sysv/linux/setitimer.c | 95 > +++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/tv32-compat.h | > 31 +++++++++ 5 files changed, 200 insertions(+), 2 deletions(-) > create mode 100644 sysdeps/unix/sysv/linux/getitimer.c > create mode 100644 sysdeps/unix/sysv/linux/setitimer.c > create mode 100644 sysdeps/unix/sysv/linux/tv32-compat.h >=20 > diff --git a/include/time.h b/include/time.h > index 8a4abb159f..eaa536d5c0 100644 > --- a/include/time.h > +++ b/include/time.h > @@ -6,6 +6,7 @@ > # include > # include > # include