]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: Remove unnecessary catch-all-wake in condvar group switch
authorMalte Skarupke <malteskarupke@fastmail.fm>
Wed, 4 Dec 2024 12:55:50 +0000 (07:55 -0500)
committerCarlos O'Donell <carlos@redhat.com>
Tue, 29 Apr 2025 17:25:53 +0000 (13:25 -0400)
commitd0da34ad302df61c4e4c3030845cbe9b986196bf
tree8c3fa95e05aca4e9366d6692982e9a1ddb431d3f
parentea13a35e37932cabeef7d7b018aaef1136287a5e
nptl: Remove unnecessary catch-all-wake in condvar group switch

This wake is unnecessary. We only switch groups after every sleeper in a group
has been woken. Sure, they may take a while to actually wake up and may still
hold a reference, but waking them a second time doesn't speed that up. Instead
this just makes the code more complicated and may hide problems.

In particular this safety wake wouldn't even have helped with the bug that was
fixed by Barrus' patch: The bug there was that pthread_cond_signal would not
switch g1 when it should, so we wouldn't even have entered this code path.

Signed-off-by: Malte Skarupke <malteskarupke@fastmail.fm>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit b42cc6af11062c260c7dfa91f1c89891366fed3e)
nptl/pthread_cond_common.c