projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
avoid all malloc/free in timer creation/destruction
[oweals/musl.git]
/
src
/
time
/
timer_delete.c
1
#include <time.h>
2
#include "pthread_impl.h"
3
4
int timer_delete(timer_t t)
5
{
6
pthread_t td = 0;
7
int r;
8
if ((uintptr_t)t & 1) t = (void *)((unsigned long)t / 2);
9
else td = t, t = td->result;
10
r = __syscall(SYS_timer_delete, (long)t);
11
if (td) pthread_cancel(td);
12
return r;
13
}