HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/usr/src/glibc/debian/patches/hurd-i386/git-barrier-1.diff
commit 29bc8736d1fdb80d2416b3920080dad58b32bf44
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Feb 9 23:02:13 2020 +0000

    htl: Fix barrier_wait with one thread

diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c
index 47ec440b26..146605abd8 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;