1 === modified file 'parallel.c'
2 --- parallel.c 2008-09-28 12:25:57 +0000
3 +++ parallel.c 2008-09-28 12:56:42 +0000
7 if (!threads_started) {
8 + pthread_attr_t tattr;
10 + r= pthread_attr_init(&tattr);
11 + if (r) { errno=r; diee("pthread_attr_init"); }
13 + r= pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM);
14 + if (r) { errno=r; diee("pthread_attr_setscope"); }
16 r= pthread_barrier_init(&threads_barrier, 0, NSECTIONS);
17 if (r) { errno=r; diee("pthread_barrier_init"); }
20 if (r) { errno=r; diee("pthread_create"); }
24 + r= pthread_attr_destroy(&tattr);
25 + if (r) { errno=r; diee("pthread_attr_destroy"); }
28 for (s=0; s<NSECTIONS-1; s++) {