bart | e8d005c | 2008-06-29 07:20:00 +0000 | [diff] [blame] | 1 | /** Trigger barrier reinitialization, which is not allowed by the POSIX |
| 2 | * threads standard. See also http://www.opengroup.org/onlinepubs/000095399/functions/pthread_barrier_init.html. |
| 3 | */ |
| 4 | |
| 5 | |
| 6 | #define _GNU_SOURCE |
| 7 | |
bart | d9e39ec | 2008-06-28 15:03:26 +0000 | [diff] [blame] | 8 | #include <pthread.h> |
| 9 | |
bart | e8d005c | 2008-06-29 07:20:00 +0000 | [diff] [blame] | 10 | |
bart | d9e39ec | 2008-06-28 15:03:26 +0000 | [diff] [blame] | 11 | int main(int argc, char** argv) |
| 12 | { |
| 13 | pthread_barrier_t b; |
| 14 | pthread_barrier_init(&b, 0, 1); |
| 15 | pthread_barrier_init(&b, 0, 1); |
| 16 | return 0; |
| 17 | } |