about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/pt-barrier-wait.c4
1 files changed, 3 insertions, 1 deletions
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;