6 #include <internaltypes.h>
18 if (sem_init (&u
.s
, 0, 0) != 0)
20 puts ("sem_init failed");
24 struct timespec ts
= { 0, 1000000001 }; /* Invalid. */
26 if (sem_timedwait (&u
.s
, &ts
) >= 0)
28 puts ("sem_timedwait did not fail");
33 puts ("sem_timedwait did not fail with EINVAL");
36 if (u
.ns
.nwaiters
!= 0)
38 puts ("nwaiters modified");
45 #define TEST_FUNCTION do_test ()
46 #include "../test-skeleton.c"