1 // this is a variation of bug484480.c using sem_clockwait_np
13 static void* func(void* data
)
25 pthread_create(&tid
, NULL
, func
, NULL
);
27 struct timespec ts
= {0, 100000};
28 struct timespec ts_remain
;
30 while (sem_clockwait_np(&sem
, CLOCK_REALTIME
, 0, &ts
, &ts_remain
))
31 ; // do nothing but keep retrying
33 printf("%s\n", result
);
35 pthread_join(tid
, NULL
);