reorder timer initialization so that timer_create does not depend on free
this allows small programs which only create times, but never delete them, to use simple_malloc instead of the full malloc.
This commit is contained in:
@@ -5,7 +5,7 @@ int timer_delete(timer_t t)
|
||||
{
|
||||
if (t->thread) pthread_cancel(t->thread);
|
||||
else {
|
||||
if (t->timerid >= 0) __syscall(SYS_timer_delete, t->timerid);
|
||||
__syscall(SYS_timer_delete, t->timerid);
|
||||
free(t);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user