]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: Use a single loop in pthread_cond_wait instaed of a nested loop
authorMalte Skarupke <malteskarupke@fastmail.fm>
Wed, 4 Dec 2024 13:03:44 +0000 (08:03 -0500)
committerCarlos O'Donell <carlos@redhat.com>
Tue, 29 Apr 2025 17:26:12 +0000 (13:26 -0400)
commit582c99b2c04d6da95743b36bf8e5c54dec178274
treee7909154824829a4e70cc2e58f96b869b008f7af
parentfc2a25417df71a1ef3613216269227b7721b21c8
nptl: Use a single loop in pthread_cond_wait instaed of a nested loop

The loop was a little more complicated than necessary. There was only one
break statement out of the inner loop, and the outer loop was nearly empty.
So just remove the outer loop, moving its code to the one break statement in
the inner loop. This allows us to replace all gotos with break statements.

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