r6320 - glibc-package/trunk/debian/patches/hurd-i386
Author: sthibault
Date: 2014-11-02 14:13:22 +0000 (Sun, 02 Nov 2014)
New Revision: 6320
Modified:
glibc-package/trunk/debian/patches/hurd-i386/cvs-libpthread.diff
Log:
hurd-i386/cvs-libpthread.diff: Update to Sun Nov 2
also fix pthread_barrier_wait safety.
Modified: glibc-package/trunk/debian/patches/hurd-i386/cvs-libpthread.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-libpthread.diff 2014-11-02 03:24:31 UTC (rev 6319)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-libpthread.diff 2014-11-02 14:13:22 UTC (rev 6320)
@@ -1,5 +1,5 @@
-git snapshot 46d3992fea0690f81ed3924a0a13f3aecde809ae
-Date: Sun Nov 2 04:20:13 2014 +0100
+git snapshot 01a36d151b82f6034c9e8721a5f486ab95254d35
+Date: Sun Nov 2 15:07:29 2014 +0100
---
ChangeLog | 6
@@ -83,7 +83,7 @@
sysdeps/generic/pt-attr.c | 41 +
sysdeps/generic/pt-barrier-destroy.c | 27
sysdeps/generic/pt-barrier-init.c | 53 +
- sysdeps/generic/pt-barrier-wait.c | 61 ++
+ sysdeps/generic/pt-barrier-wait.c | 69 ++
sysdeps/generic/pt-barrier.c | 26
sysdeps/generic/pt-barrierattr-destroy.c | 27
sysdeps/generic/pt-barrierattr-getpshared.c | 29
@@ -233,7 +233,7 @@
tests/test-8.c | 60 ++
tests/test-9.c | 88 +++
tests/test-__pthread_destroy_specific-skip.c | 83 ++
- 231 files changed, 13243 insertions(+)
+ 231 files changed, 13251 insertions(+)
diff --exclude .svn --exclude .git --exclude CVS --exclude .hg -urN a/libpthread/ChangeLog b/libpthread/ChangeLog
--- a/libpthread/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+++ b/libpthread/ChangeLog 2009-10-14 03:39:13.000000000 +0200
@@ -6241,8 +6241,8 @@
+}
diff --exclude .svn --exclude .git --exclude CVS --exclude .hg -urN a/libpthread/sysdeps/generic/pt-barrier-wait.c b/libpthread/sysdeps/generic/pt-barrier-wait.c
--- a/libpthread/sysdeps/generic/pt-barrier-wait.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/libpthread/sysdeps/generic/pt-barrier-wait.c 2009-07-11 11:29:35.000000000 +0200
-@@ -0,0 +1,61 @@
++++ b/libpthread/sysdeps/generic/pt-barrier-wait.c 2014-11-02 15:01:53.930968585 +0100
+@@ -0,0 +1,69 @@
+/* pthread_barrier_wait. Generic version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -6278,16 +6278,24 @@
+ if (barrier->count > 1)
+ {
+ struct __pthread *wakeup;
++ unsigned n = 0;
+
-+ wakeup = barrier->queue;
-+ barrier->queue = NULL;
-+ __pthread_spin_unlock (&barrier->lock);
++ __pthread_queue_iterate (barrier->queue, wakeup)
++ n ++;
+
-+ /* We can safely walk the list of waiting threads without
-+ holding the lock since it is decoupled from the barrier
-+ variable now. */
-+ __pthread_dequeuing_iterate (wakeup, wakeup)
-+ __pthread_wakeup (wakeup);
++ {
++ struct __pthread *wakeups[n];
++ unsigned i = 0;
++
++ __pthread_dequeuing_iterate (barrier->queue, wakeup)
++ wakeups[i ++] = wakeup;
++
++ barrier->queue = NULL;
++ __pthread_spin_unlock (&barrier->lock);
++
++ for (i = 0; i < n; i ++)
++ __pthread_wakeup (wakeups[i]);
++ }
+ }
+
+ return PTHREAD_BARRIER_SERIAL_THREAD;
Reply to: