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=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham 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 72F4E1F461 for ; Tue, 25 Jun 2019 13:30:45 +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=Er8Y Ekuv0kuvuJt4al/bLZKGvfKO7eugPaUdCTzh+TtNGhWehnYdb8n6IUtRuEZulrgQ xuQ+IkT98P51o2jxW6/JvpeCYO/BX5UtyycG9FvLhqJx583j5IPzCYQ0kVb2Dn1P UUwxf3qX7T1EMHQTvT6kCQ2ImLY61hc2aO0tVvU= 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=juZkK0dd7B NO70qGE4ntmB+eXlw=; b=qw0/or8cRKWwA1xar6MuREG2OVH5zHAp2AmdVOcOuy PYp4BW+0RYUiOIY7K8wgQM+ksQ3cMwTOhS9/yQqE8xESBskntjpuDrzCEAUQq5gW oDlbrCujjNSEXN3UJXj3bEl7kgt6t32NvSMlhXWAB7N9k7JUK7dTfjYb/3I/i0X7 U= Received: (qmail 57045 invoked by alias); 25 Jun 2019 13:30:38 -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 56953 invoked by uid 89); 25 Jun 2019 13:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qt1-f193.google.com MIME-Version: 1.0 References: <2df9d3878359585ac1cc46243fb6664f7a50b3b3.1561421042.git.alistair.francis@wdc.com> <87ftnx6i0m.fsf@oldenburg2.str.redhat.com> <877e9950hj.fsf@oldenburg2.str.redhat.com> In-Reply-To: <877e9950hj.fsf@oldenburg2.str.redhat.com> From: Arnd Bergmann Date: Tue, 25 Jun 2019 15:29:55 +0200 Message-ID: Subject: Re: [RFC v2 08/20] sysdeps/wait: Use waitid if avaliable To: Florian Weimer Cc: Zack Weinberg , Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" On Tue, Jun 25, 2019 at 2:10 PM Florian Weimer wrote: > > * Arnd Bergmann: > > > The kernel system call waitid() is a superset of glibc's wait4() and > > waitid(), it has an extra rusage argument. > > > > Originally, my plan was to replace kernel's waitid() with > > a waitid_time64() that takes an updated rusage structure, > > but that never happened. > > > > I still left wait4() commented out since it should not be > > needed when the kernel has waitid(). I have an implementation > > of wait4() based on waitid() that I did for musl and tested > > successfully with ltp, see [1]. > > Unless I did something very wrong there, you should be able > > to use something like this in glibc. > > > > Similar coversions of timeval have to be done in getrusage(), > > getitimer() and setitimer(), all of which expect a 32-bit > > timeval couting elapsed time (so no overflow in y2038). > > These need to be converted to the 64-bit timeval in the > > public glibc interface. > > Does this means that RV32 will use a 32-bit struct timeval in those > system calls? Even if everything else 64-bit? Correct. Only those four (all deprecated but still used) system calls, as we could not agree on a new interface before 5.1, and there is no urgency for deployment when they can be emulated. I agree this is ugly, sorry for having dropped the mess into your area instead of fixing it in the kernel. Arnd