tst-sem12.c 260 B

1234567891011121314
  1. #include <time.h>
  2. #include <sys/time.h>
  3. #define PREPARE \
  4. struct timespec ts; \
  5. struct timeval tv; \
  6. gettimeofday (&tv, NULL); \
  7. TIMEVAL_TO_TIMESPEC (&tv, &ts); \
  8. ts.tv_sec += 60;
  9. #define SEM_WAIT(s) sem_timedwait (s, &ts)
  10. #include "tst-sem11.c"