[v2,0/9] Patch to fix glibc condition variable bug (BZ 25847)

Message ID 20230504045503.83276-1-malteskarupke@fastmail.fm
Series Patch to fix glibc condition variable bug (BZ 25847) |


develop--- via Libc-alpha May 4, 2023, 4:54 a.m. UTC
  From: Malte Skarupke <malteskarupke@fastmail.fm>

This is v2 of the patches, v1 here:

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(-)