chiark / gitweb /
apparently-useless patch
authorIan Jackson <ijackson@kolmogorov>
Sun, 28 Sep 2008 13:12:20 +0000 (14:12 +0100)
committerIan Jackson <ijackson@kolmogorov>
Sun, 28 Sep 2008 13:12:20 +0000 (14:12 +0100)
PTHREAD_SCOPE_SYSTEM.patch [new file with mode: 0644]

diff --git a/PTHREAD_SCOPE_SYSTEM.patch b/PTHREAD_SCOPE_SYSTEM.patch
new file mode 100644 (file)
index 0000000..56db719
--- /dev/null
@@ -0,0 +1,29 @@
+=== modified file 'parallel.c'
+--- parallel.c 2008-09-28 12:25:57 +0000
++++ parallel.c 2008-09-28 12:56:42 +0000
+@@ -55,6 +55,14 @@
+   int s, r;
+   if (!threads_started) {
++    pthread_attr_t tattr;
++
++    r= pthread_attr_init(&tattr);
++    if (r) { errno=r; diee("pthread_attr_init"); }
++
++    r= pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM);
++    if (r) { errno=r; diee("pthread_attr_setscope"); }
++
+     r= pthread_barrier_init(&threads_barrier, 0, NSECTIONS);
+     if (r) { errno=r; diee("pthread_barrier_init"); }
+@@ -63,6 +71,9 @@
+       if (r) { errno=r; diee("pthread_create"); }
+     }
+     threads_started= 1;
++
++    r= pthread_attr_destroy(&tattr);
++    if (r) { errno=r; diee("pthread_attr_destroy"); }
+   }    
+   for (s=0; s<NSECTIONS-1; s++) {
+