public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: Malte Skarupke <malteskarupke@web.de>, libc-alpha@sourceware.org
Cc: malteskarupke@fastmail.fm
Subject: Re: [PATCH 5/5] nptl: Rename __wrefs to __flags because its meaning has changed
Date: Tue, 19 Jan 2021 00:47:19 +0100	[thread overview]
Message-ID: <a9dee0e6443c96566bd4230ada43a5eccd20d827.camel@redhat.com> (raw)
In-Reply-To: <20210116204950.16434-5-malteskarupke@web.de>

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".


  reply	other threads:[~2021-01-18 23:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 20:49 [PATCH 1/5] nptl: Fix pthread_cond_signal missing a sleeper (#BZ 25847) Malte Skarupke
2021-01-16 20:49 ` [PATCH 2/5] nptl: Remove the signal-stealing code. It is no longer needed Malte Skarupke
2021-01-16 20:49 ` [PATCH 3/5] nptl: Optimization by not incrementing wrefs in pthread_cond_wait Malte Skarupke
2021-01-18 23:41   ` Torvald Riegel
2021-01-16 20:49 ` [PATCH 4/5] nptl: Make test-cond-printers check the number of waiters Malte Skarupke
2021-01-16 20:49 ` [PATCH 5/5] nptl: Rename __wrefs to __flags because its meaning has changed Malte Skarupke
2021-01-18 23:47   ` Torvald Riegel [this message]
2021-01-18 22:43 ` [PATCH 1/5] nptl: Fix pthread_cond_signal missing a sleeper (#BZ 25847) Torvald Riegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9dee0e6443c96566bd4230ada43a5eccd20d827.camel@redhat.com \
    --to=triegel@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=malteskarupke@fastmail.fm \
    --cc=malteskarupke@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).