6 /* Simple test program, has a race. Parent and child both modify x
11 void* child_fn ( void* arg
)
13 /* Unprotected relative to parent */
20 const struct timespec delay
= { 0, 100 * 1000 * 1000 };
22 if (pthread_create(&child
, NULL
, child_fn
, NULL
)) {
23 perror("pthread_create");
27 /* Unprotected relative to child */
30 if (pthread_join(child
, NULL
)) {
31 perror("pthread join");