git-barrier-1
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 13 Jul 2020 19:34:17 +0000 (20:34 +0100)
committerAurelien Jarno <aurel32@debian.org>
Mon, 13 Jul 2020 19:34:17 +0000 (20:34 +0100)
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

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-barrier-1.diff

sysdeps/htl/pt-barrier-wait.c

index 47ec440b26fd8f6b53203ff6ce0cd020ce4d6e44..146605abd8757d2006a0ecebd0ba2ede9e3d4773 100644 (file)
@@ -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;