From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 070F4385AC29 for ; Tue, 7 Mar 2023 08:40:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 070F4385AC29 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1678178419; bh=/M9QcyBKZnhSiIeklhBH2dF4nEA7ib1vN+JjaYXWSFU=; h=Subject:From:To:Date:In-Reply-To:References:From; b=i4pinhXxF61zsx/ac8krMCExyaCARaIoI7CwqyO4eUDfSEIlFHxUZpQjtpyoHFC1+ CNEPtvnl1RPPiRI3E0061ymi/6zpzPkKbCu2D/PPc1EzlwokBELpQwnsK0ZgT6fpL1 WNpPTC4BDZLT25Z7JMkrb8AGUrvq+j19VLtwIeC0= Received: from [IPv6:240e:457:1130:24c0:882b:64fc:f6e9:11b3] (unknown [IPv6:240e:457:1130:24c0:882b:64fc:f6e9:11b3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 92BF465ADA; Tue, 7 Mar 2023 03:40:15 -0500 (EST) Message-ID: <38edf460b4dba6f33af637f15a528076b1ce5777.camel@xry111.site> Subject: Re: [PATCH] nptl: pthread_rwlock_rdlock return in low priority From: Xi Ruoyao To: abushwang , libc-alpha@sourceware.org, drepper.fsp@gmail.com Date: Tue, 07 Mar 2023 16:40:10 +0800 In-Reply-To: <20230307035030.437573-1-abushwangs@gmail.com> References: <20230307035030.437573-1-abushwangs@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-03-07 at 11:50 +0800, abushwang via Libc-alpha wrote: > Signed-off-by: abushwang > --- > =C2=A0nptl/pthread_rwlock_common.c | 1 + > =C2=A01 file changed, 1 insertion(+) >=20 > diff --git a/nptl/pthread_rwlock_common.c b/nptl/pthread_rwlock_common.c > index 5266a00ed1..35b00fc14f 100644 > --- a/nptl/pthread_rwlock_common.c > +++ b/nptl/pthread_rwlock_common.c > @@ -389,6 +389,7 @@ __pthread_rwlock_rdlock_full64 (pthread_rwlock_t *rwl= ock, clockid_t clockid, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 complexity.=C2=A0 */ > =C2=A0=C2=A0 if (__glibc_likely ((r & PTHREAD_RWLOCK_WRPHASE) =3D=3D 0)) > =C2=A0=C2=A0=C2=A0=C2=A0 return 0; > + I don't think simply adding an empty line can fix anything. > =C2=A0=C2=A0 /* Otherwise, if we were in a write phase (states #6 or #8),= we must wait > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for explicit hand-over of the read phase; = the only exception is if we > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 can start a read phase if there is no prim= ary writer currently.=C2=A0 */ > -- > 2.36.1 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University