From: GNU Libc Maintainers Date: Wed, 30 Apr 2025 01:01:35 +0000 (+0800) Subject: git-barrier-1 X-Git-Tag: archive/raspbian/2.31-13+rpi1+deb11u12^2~104 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ffba7f269ff628a6134109c209f4a8dc40b746b1;p=glibc.git git-barrier-1 Committed for glibc 2.32 commit 29bc8736d1fdb80d2416b3920080dad58b32bf44 Author: Samuel Thibault Date: Sun Feb 9 23:02:13 2020 +0000 htl: Fix barrier_wait with one thread Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-barrier-1.diff --- diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c index 47ec440b2..146605abd 100644 --- a/sysdeps/htl/pt-barrier-wait.c +++ b/sysdeps/htl/pt-barrier-wait.c @@ -29,7 +29,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier) { barrier->__pending = barrier->__count; - if (barrier->__count > 1) + if (barrier->__count == 1) + __pthread_spin_unlock (&barrier->__lock); + else { struct __pthread *wakeup; unsigned n = 0;