From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id DF1AA1F45E for ; Tue, 18 Feb 2020 19:02:18 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=FW++ 5IY2/1STbVVfqZ91SChe+A3j7rufWegEvNYKG/SkipzlU8ErOEO/KdnJRKCQQEBj GKbEQHWiUqKSfslcgl8GuzDz6rL9iKkK47EQPAR7oOpZDiv4IpIm1FwXEw/yu3of shQxxTb3Ton+ha6yTWYNqisUuXxijiZYKtZ0ZSc= 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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=OTqgAo391M sUY2ol8QqK3ziE7jk=; b=BCzK2kSDaVqWnYRMhTE3+uKIjRWUQPimXjyQ3cqWHh iemNePLD/rAADWbSDOUoqsJWDccrpcnKv1edm2jJLeMJ+oT6BXj3cZIbAjeVtUzi E1AP2wliUh6ofvMsC9SDdeOl0FdRXjuf2nvLuW5wNhA+i8siG1++ZN4UGQFSacF2 I= 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-Unsubscribe: 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-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 10:54:43 -0800 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" 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