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