From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24189 invoked by alias); 18 Feb 2020 19:02:16 -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 24153 invoked by uid 89); 18 Feb 2020 19:02:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=*64 X-HELO: mail-lj1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEPVyfPg8TvQ4F/HEl2NAhw0EsjEPf5ItPlwB3GqsH8=; b=bUn5g9ULLjrcFGkmNbRKuQdzw/7m/4zvnWh5kWKdcE3YQd3QyGoeaCgqXCJOD2zB9j 4TmWjIaF8vLTKiVIKVQCH8kpP9/6ZATqsvng/FfHszDcBjOr7owUMz/neW93xFurLHvY 8Xa3epXZCtsrdPmWF7wX+2jPCwWZuCS23e9yA7S2DBy5os+rkTmCKNo0d0wtBnISO+M2 h2/7tQO2+Dkm57xpLe2hD2zQarIe5afgX4Wo6ZIyQoJ93EKHnBIXiRX2Aj5X3x9FGzTm KetY0VtEGlOxJgT9fFbhRDtgKcyrnq1fTgDDIXaabZkptdZGpP5/UQy4gjqzGdzcGVL1 Pp5A== MIME-Version: 1.0 References: <20200214163134.31601-1-alistair.francis@wdc.com> <20200214163134.31601-6-alistair.francis@wdc.com> <20200215172645.4ea3375d@jawa> In-Reply-To: <20200215172645.4ea3375d@jawa> From: Alistair Francis Date: Tue, 18 Feb 2020 19:02:00 -0000 Message-ID: Subject: Re: [PATCH v3 5/8] linux: Use long time_t __getitimer/__setitimer To: Lukasz Majewski Cc: Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2020-02/txt/msg00803.txt.bz2 On Sat, Feb 15, 2020 at 8:26 AM Lukasz Majewski wrote: > > 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. > > > > 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/sysv/linux/getitimer.c | 61 +++++++++++++++++ > > sysdeps/unix/sysv/linux/setitimer.c | 95 > > +++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/tv32-compat.h | > > 35 ++++++++++ 4 files changed, 206 insertions(+) > > 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 > > > > diff --git a/include/time.h b/include/time.h > > index 34dffaf95f..cdaf461c3f 100644 > > --- a/include/time.h > > +++ b/include/time.h > > @@ -6,6 +6,7 @@ > > # include > > # include > > # include