timer_settime.c 298 B

123456789
  1. #include <time.h>
  2. #include "pthread_impl.h"
  3. int timer_settime(timer_t t, int flags, const struct itimerspec *val, struct itimerspec *old)
  4. {
  5. if ((uintptr_t)t & 1) t = (void *)((unsigned long)t / 2);
  6. else t = ((pthread_t)t)->result;
  7. return syscall(SYS_timer_settime, (long)t, flags, val, old);
  8. }