]> git.proxmox.com Git - wasi-libc.git/blame - libc-top-half/musl/src/time/timer_delete.c
Update to musl 1.1.22.
[wasi-libc.git] / libc-top-half / musl / src / time / timer_delete.c
CommitLineData
320054e8
DG
1#include <time.h>
2#include <limits.h>
3#include "pthread_impl.h"
4
5int timer_delete(timer_t t)
6{
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);
f41256b6 10 __syscall(SYS_tkill, td->tid, SIGTIMER);
320054e8
DG
11 return 0;
12 }
13 return __syscall(SYS_timer_delete, t);
14}