From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 067A63857C66 for ; Mon, 18 Jan 2021 23:47:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 067A63857C66 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-sFNMQlZqMtG31syGR_-pzQ-1; Mon, 18 Jan 2021 18:47:23 -0500 X-MC-Unique: sFNMQlZqMtG31syGR_-pzQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA6EC107ACE3; Mon, 18 Jan 2021 23:47:22 +0000 (UTC) Received: from ovpn-115-172.ams2.redhat.com (ovpn-115-172.ams2.redhat.com [10.36.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE9A29CA0; Mon, 18 Jan 2021 23:47:21 +0000 (UTC) Message-ID: Subject: Re: [PATCH 5/5] nptl: Rename __wrefs to __flags because its meaning has changed From: Torvald Riegel To: Malte Skarupke , libc-alpha@sourceware.org Cc: malteskarupke@fastmail.fm Date: Tue, 19 Jan 2021 00:47:19 +0100 In-Reply-To: <20210116204950.16434-5-malteskarupke@web.de> References: <20210116204950.16434-1-malteskarupke@web.de> <20210116204950.16434-5-malteskarupke@web.de> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2021 23:47:27 -0000 On Sat, 2021-01-16 at 15:49 -0500, Malte Skarupke wrote: > When I remove the increment/decrement of wrefs in pthread_cond_wait, > it no longer really had the meaning of representing the number of > waiters. So the name "wrefs" is no longer accurate. It is still used > as a reference count in an edge case, in the interaction between > pthread_cancel and pthread_cond_destroy, but that edge case shouldn't > be what this variable is named after. I don't think that this change is good. Cancellation is not necessarily an "edge case" because it will happen whenever timeouts are involved. More importantly, the wake-up flag is an integral part of the refcount. The other flags in there are just in there because available space was scarce (ABI...). So if you want to rename it, I'd make it "cancellation_refs" or "crefs" or something like that, not just "flags".