blob: 62631aa49cda75f49fba047163747cd29faa60e3 [file] [log] [blame]
Viet-Trung Luu96b05c12016-01-11 11:26:36 -08001#include <time.h>
2#include <limits.h>
3#include "pthread_impl.h"
4
5int timer_settime(timer_t t, int flags, const struct itimerspec *restrict val, struct itimerspec *restrict old)
6{
7 if ((intptr_t)t < 0) {
8 pthread_t td = (void *)((uintptr_t)t << 1);
9 t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
10 }
11 return syscall(SYS_timer_settime, t, flags, val, old);
12}