netinet/tcp.h: add TCP_NLA_* values up to linux v5.12
[musl.git] / src / time / timer_delete.c
blobb0bfac0968a74df8c74db8bf94146085300f0794
1 #include <time.h>
2 #include <limits.h>
3 #include "pthread_impl.h"
5 int timer_delete(timer_t t)
7 if ((intptr_t)t < 0) {
8 pthread_t td = (void *)((uintptr_t)t << 1);
9 a_store(&td->timer_id, td->timer_id | INT_MIN);
10 __syscall(SYS_tkill, td->tid, SIGTIMER);
11 return 0;
13 return __syscall(SYS_timer_delete, t);