public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: Fix barrier_wait with one thread
@ 2020-02-10  1:04 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-02-10  1:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7

commit f3a7ff069f74e4d6a89aba5fb9bba74f38d249c7
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:
---
 sysdeps/htl/pt-barrier-wait.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-10  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10  1:04 [glibc] htl: Fix barrier_wait with one thread Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).