From patchwork Mon Jan 2 14:47:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torvald Riegel X-Patchwork-Id: 89512 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp7619362qgi; Mon, 2 Jan 2017 06:47:46 -0800 (PST) X-Received: by 10.84.195.228 with SMTP id j91mr124476036pld.88.1483368466198; Mon, 02 Jan 2017 06:47:46 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o8si43493616pgi.313.2017.01.02.06.47.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 06:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76519-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-76519-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76519-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version; q=dns; s=default; b=M7yQk 1X04HD4E1Lkvenjx8zPlMYgFhJ3vxADHle1GkrQwcApYejnhk293L1RjD+ztAa3U 04ds/CsfgN/D0dMMCeRn6vwJWR/VLH+mzYagQqb4rk42HPWhcECakEnxeLrN5+wS xSpnDEkFOXS56AicIzOz5yRMbm6WXZxL3TW/4w= 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:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version; s=default; bh=JWSfB7kTC23 05evzi4NdQlW5Oik=; b=pnZ+/MeGLDJunwzRrU6jIZeie9y9lo8kGFJF+pprio4 I9g6YCbjWR6iFcmu/NeqxOV2bT4AEAPCHAmpckXvpSkjEo9x2/WbWDEakv0TebJ0 ss52A4aKOQ/r4/h5rYuBaoYNwkA7v1T35cUI+aODU3a73iLpnbcfcgI35Gx1VH0E = Received: (qmail 34290 invoked by alias); 2 Jan 2017 14:47:36 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 34266 invoked by uid 89); 2 Jan 2017 14:47:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Adapt, Hx-languages-length:2380, __g_size, __high X-HELO: mx1.redhat.com Message-ID: <1483368450.13143.70.camel@redhat.com> Subject: Re: [PATCH] New condvar implementation that provides stronger ordering guarantees. From: Torvald Riegel To: Joseph Myers Cc: "Carlos O'Donell" , GLIBC Devel , David Miller , Darren Hart Date: Mon, 02 Jan 2017 15:47:30 +0100 In-Reply-To: References: <1464268895.17104.14.camel@localhost.localdomain> <1465937639.31784.7.camel@localhost.localdomain> <696ddced-4efa-62ac-9fb5-01022b0437e8@redhat.com> Mime-Version: 1.0 On Sat, 2016-12-31 at 17:37 +0000, Joseph Myers wrote: > In addition to hppa (as expected), it appears the build is broken for > sparcv9 (previous discussion said it was broken for pre-v9, did the > expected breakage change as a result of other sparc changes?). I had initially left sparc pthreadtypes.h untouched because I assumed sparc would do something (eg, have proper atomics availabe for all sparc variants) -- and then failed to make some decision regarding sparc before commiting the new condvar. The attached patch just adds the new definitions to sparc's pthreadtypes.h, which should fix your build problem. Can you give it a try? Also, while we're at it, could you please have a look at the change to aarch64 pthread_cond_t introduced with the new condvar? I applied this change: - long int __align; + __extension__ long long int __align; which seemed fine because the previous struct definition also had long long int fields. Is this okay? (Same for ia64.) commit 62210e7eb1b270c72c2ee61a14015285cd817262 Author: Torvald Riegel Date: Mon Jan 2 15:39:14 2017 +0100 Fix pthread_cond_t on sparc for new condvar. * sysdeps/sparc/nptl/bits/pthreadtypes.h (pthread_cond_t): Adapt to new condvar. diff --git a/sysdeps/sparc/nptl/bits/pthreadtypes.h b/sysdeps/sparc/nptl/bits/pthreadtypes.h index ebef53a..5685d95 100644 --- a/sysdeps/sparc/nptl/bits/pthreadtypes.h +++ b/sysdeps/sparc/nptl/bits/pthreadtypes.h @@ -122,14 +122,27 @@ typedef union { struct { - int __lock; - unsigned int __futex; - __extension__ unsigned long long int __total_seq; - __extension__ unsigned long long int __wakeup_seq; - __extension__ unsigned long long int __woken_seq; - void *__mutex; - unsigned int __nwaiters; - unsigned int __broadcast_seq; + __extension__ union + { + __extension__ unsigned long long int __wseq; + struct { + unsigned int __low; + unsigned int __high; + } __wseq32; + }; + __extension__ union + { + __extension__ unsigned long long int __g1_start; + struct { + unsigned int __low; + unsigned int __high; + } __g1_start32; + }; + unsigned int __g_refs[2]; + unsigned int __g_size[2]; + unsigned int __g1_orig_size; + unsigned int __wrefs; + unsigned int __g_signals[2]; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align;