From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125890 invoked by alias); 25 Mar 2017 20:39:15 -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 125863 invoked by uid 89); 25 Mar 2017 20:39:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 31F2A81227 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=triegel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 31F2A81227 Message-ID: <1490474164.26906.386.camel@redhat.com> Subject: Re: [PATCH] rwlock: Fix explicit hand-over. From: Torvald Riegel To: Florian Weimer Cc: GLIBC Devel , Waiman Long , Carlos O'Donell Date: Sat, 25 Mar 2017 20:39:00 -0000 In-Reply-To: <87inmxkt67.fsf@mid.deneb.enyo.de> References: <1490471341.26906.366.camel@redhat.com> <87inmxkt67.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-03/txt/msg00600.txt.bz2 On Sat, 2017-03-25 at 21:17 +0100, Florian Weimer wrote: > * Torvald Riegel: > > > + bool registered_while_in_write_phase = false; > > if (__glibc_likely ((r & PTHREAD_RWLOCK_WRPHASE) == 0)) > > return 0; > > + else > > + registered_while_in_write_phase = true; > > Sorry, this doesn't look quite right. Isn't > registered_while_in_write_phase always true? It's intended and I think it's correct, but I agree it's not pretty :) I'll fix this by cleaning up the code a little more in v2 of this patch.