9 static pthread_barrier_t b
;
28 int e
= pthread_barrier_wait (&b
);
29 if (e
!= 0 && e
!= PTHREAD_BARRIER_SERIAL_THREAD
)
31 puts ("barrier_wait failed");
35 e
= pthread_create (&th
, NULL
, tf2
, NULL
);
38 printf ("create failed: %s\n", strerror (e
));
42 /* Terminate only this thread. */
52 if (pthread_barrier_init (&b
, NULL
, 2) != 0)
54 puts ("barrier_init failed");
58 int e
= pthread_create (&th
, NULL
, tf
, NULL
);
61 printf ("create failed: %s\n", strerror (e
));
65 e
= pthread_barrier_wait (&b
);
66 if (e
!= 0 && e
!= PTHREAD_BARRIER_SERIAL_THREAD
)
68 puts ("barrier_wait failed");
72 /* Terminate only this thread. */
79 #define EXPECTED_SIGNAL SIGALRM
80 #define TEST_FUNCTION do_test ()
81 #include "../test-skeleton.c"