public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: malteskarupke@fastmail.fm
To: libc-alpha@sourceware.org
Cc: Malte Skarupke <malteskarupke@fastmail.fm>
Subject: [PATCH v2 0/9] Patch to fix glibc condition variable bug (BZ 25847)
Date: Thu,  4 May 2023 00:54:54 -0400	[thread overview]
Message-ID: <20230504045503.83276-1-malteskarupke@fastmail.fm> (raw)

From: Malte Skarupke <malteskarupke@fastmail.fm>

This is v2 of the patches, v1 here:
https://sourceware.org/pipermail/libc-alpha/2023-January/145023.html

The only difference is using of release semantics in pthread_cond_common
when writing to g_signals. Updating this one is a no-brainer because it
was just incorrect. I did not update any other writes to g_signals
because there is more of a debate there on whether pthread_cond_signal
should synchronize with pthread_cond_wait. It does not in the old
implementation, which relies on the fact that condition variables are
always used together with mutexes.

Frank Barrus (1):
  pthreads NPTL: lost wakeup fix 2

Malte Skarupke (8):
  nptl: Update comments and indentation for new condvar implementation
  nptl: Remove unnecessary catch-all-wake in condvar group switch
  nptl: Remove unnecessary quadruple check in pthread_cond_wait
  nptl: Remove g_refs from condition variables
  nptl: Use a single loop in pthread_cond_wait instaed of a nested loop
  nptl: Fix indentation
  nptl: rename __condvar_quiesce_and_switch_g1
  nptl: Use all of g1_start and g_signals

 nptl/pthread_cond_broadcast.c           |   8 +-
 nptl/pthread_cond_common.c              | 109 ++--------
 nptl/pthread_cond_signal.c              |  19 +-
 nptl/pthread_cond_wait.c                | 278 +++++-------------------
 nptl/tst-cond22.c                       |  12 +-
 sysdeps/nptl/bits/thread-shared-types.h |   4 +-
 sysdeps/nptl/pthread.h                  |   2 +-
 7 files changed, 100 insertions(+), 332 deletions(-)

-- 
2.34.1


             reply	other threads:[~2023-05-04  4:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04  4:54 malteskarupke [this message]
2023-05-04  4:54 ` [PATCH v2 1/9] pthreads NPTL: lost wakeup fix 2 malteskarupke
2023-05-04  4:54 ` [PATCH v2 2/9] nptl: Update comments and indentation for new condvar implementation malteskarupke
2023-05-04  4:54 ` [PATCH v2 3/9] nptl: Remove unnecessary catch-all-wake in condvar group switch malteskarupke
2023-05-04  4:54 ` [PATCH v2 4/9] nptl: Remove unnecessary quadruple check in pthread_cond_wait malteskarupke
2023-05-04  4:54 ` [PATCH v2 5/9] nptl: Remove g_refs from condition variables malteskarupke
2023-05-04  4:55 ` [PATCH v2 6/9] nptl: Use a single loop in pthread_cond_wait instaed of a nested loop malteskarupke
2023-05-04  4:55 ` [PATCH v2 7/9] nptl: Fix indentation malteskarupke
2023-05-04  4:55 ` [PATCH v2 8/9] nptl: rename __condvar_quiesce_and_switch_g1 malteskarupke
2023-05-04  4:55 ` [PATCH v2 9/9] nptl: Use all of g1_start and g_signals malteskarupke

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=20230504045503.83276-1-malteskarupke@fastmail.fm \
    --to=malteskarupke@fastmail.fm \
    --cc=libc-alpha@sourceware.org \
    /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).