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=-4.0 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 893581F4C0 for ; Thu, 31 Oct 2019 19:38:48 +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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=otbB wB3N2PL2U/zuOXPC/lIIOSto/besAiXqjixCulA9tSrQGikFtxnz0MJezU+JngEK UMttCWOkO/FonX+nBM90wDcW31jJJAG32sX+c8pBQLPByX4JCgeoQAZ+0UiOapl1 59EaQgNdJFpdlqH9cu0Jemt1j/6xGhUtYhSSclI= 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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=aEHQI4cWbu Vmj9rW2LnFghzadpk=; b=ZDDmgwATmmYTA6KmItT9kr/gHZdyMzs6DTl2di4yel SQXb1ZUoY9ilw2ffmkhcuzUCq7ZtkuVzDmDPOjAaXjeiSlbTXsNpLtEUNeVrcEeL G9BTSZlSmZrwuMH1px5Psa3Lxu1uTKWiL+RnZC1Ve9yqTO1FVoFbvkaUeQkDhNL+ 4= Received: (qmail 60200 invoked by alias); 31 Oct 2019 19:38:46 -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 60185 invoked by uid 89); 31 Oct 2019 19:38:46 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: avasout03.plus.net X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mcrowe.com; s=20191005; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=Zz+CqzwS65CCWTxIX2Ks3HybujVAL76VO1uLpzyY9TQ=; b=Ly+z9 P4mt4n14c8o8t5xtkUv3nWJ0x1QveHcqP8gy59ijoNznLAm5m7gfI3qNrCM33i2WKUnQc0ja+PbHQ SWURuJHZJBpEeQu3Hojo8MZkWqR65dSnX2LTvQr7YWZ1yBHvMIaLJuWwPGNa9dZPyc1UcfY8yFazk BZQTXmd+mAqwypOZRqaieSyEeGHNIJc4gqmGvwzmpmxSNmpUmY87swvCw7WaxrvaoFlEFUiRhhJ21 uoY1b0ZsLS9oZ1NrsI/IOV8WenO0s6jXnoSF//zK4OmNu4hL41Las9pexrVWe6guhO1Mt/NVtp2NN QK/ee4rqjRfyd0Luv/bQBNoqxkzIQ==; Date: Thu, 31 Oct 2019 19:38:24 +0000 From: Mike Crowe To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v2 0/4] nptl: Add pthread_clockjoin_np Message-ID: <20191031193824.GA23256@mcrowe.com> References: <772950b2-f186-841f-b90a-203f40fc7906@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <772950b2-f186-841f-b90a-203f40fc7906@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) On Thursday 31 October 2019 at 11:31:30 -0300, Adhemerval Zanella wrote: > On 18/09/2019 09:30, Mike Crowe wrote: > > The aim of this series is to add pthread_clockjoin_np, which works > > like pthread_timedjoin_np except it accepts an additional parameter to > > indicate which clock the timeout should be measured against. > > > > The naming matches the pthread_cond_clockwait, > > pthread_mutex_clocklock, sem_clockwait, etc. functions added in glibc > > v2.30 and documented at http://austingroupbugs.net/view.php?id=1216. > > > > The series also includes some minimal documentation for > > pthread_tryjoin_np and pthread_timedjoin_np, along with some new > > tests. > > > > Thanks to everyone who provided feedback for the first version[1] of > > this series. > > > > [1] https://sourceware.org/ml/libc-alpha/2019-06/msg00911.html > > Hi Mike, > > I think your patchset it ready to push upstream. I have fixed the small > nits I brought on the review along with some more specific changes below: > > - Move the NEWS entry for pthread_clockjoin_np to its own bullet on > 2.31. > > - Moved __pthread_clockjoin_ex to a hidden definition and removed the > hidden_{proto,def}. > > - Added some missing one line file description. > > I also pushed the set on a personal branch [1]. If you are ok with this > set, I would like to push it upstream. > > [1] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/pthread_clockjoin_np Hi Adhemerval, Thanks for doing all that. I thought that I'd addressed the nits, but I must have missed or lost some. :( Your branch looks great, except it appears to be missing this hunk from the "nptl: Add pthread_clockjoin_np" change: diff --git a/nptl/tst-join3.c b/nptl/tst-join3.c index c06e65a247..faf7683eaa 100644 --- a/nptl/tst-join3.c +++ b/nptl/tst-join3.c @@ -56,7 +56,12 @@ do_test_clock (clockid_t clockid) struct timespec timeout = timespec_add (xclock_now (clockid_for_get), make_timespec (0, 200000000)); - int val = pthread_timedjoin_np (th, &status, &timeout); + int val; + if (clockid == CLOCK_USE_TIMEDJOIN) + val = pthread_timedjoin_np (th, &status, &timeout); + else + val = pthread_clockjoin_np (th, &status, clockid, &timeout); + TEST_COMPARE (val, ETIMEDOUT); xpthread_mutex_unlock (&lock); I suspect that it's not causing the test to fail because the existing call to pthread_timedjoin_np will just time out immediately if passed the relatively small absolute CLOCK_MONOTONIC time. I shall see if I can improve this test to catch that in the future. Thanks again. Mike.