aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 23:02:13 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-10 01:03:54 +0000
commitf3a7ff069f74e4d6a89aba5fb9bba74f38d249c7 (patch)
tree96881c484eaefea77bdc6674de3057e20f310a3c /sysdeps/htl
parent8a195ec810f3d4acddcbd6c2d753edf11d105798 (diff)
downloadglibc-f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7.tar
glibc-f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7.tar.gz
glibc-f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7.tar.bz2
glibc-f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7.zip
htl: Fix barrier_wait with one thread
Diffstat (limited to 'sysdeps/htl')
-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;