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:
Rich Felker
2011-03-29 22:43:13 -04:00
parent 1c1aa32eea
commit 680630011d
2 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -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;