avoid all malloc/free in timer creation/destruction
authorRich Felker <dalias@aerifal.cx>
Wed, 30 Mar 2011 17:04:55 +0000 (13:04 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 30 Mar 2011 17:04:55 +0000 (13:04 -0400)
commit3990c5c6a40440cdb14746ac080d0ecf8d5d6733
treeb20dd1257972fdbe84202e9b6c913e90c1fa1d54
parentb8be64c43da207a2f497c1c5b5720e4a2027348a
avoid all malloc/free in timer creation/destruction

instead of allocating a userspace structure for signal-based timers,
simply use the kernel timer id. we use the fact that thread pointers
will always be zero in the low bit (actually more) to encode integer
timerid values as pointers.

also, this change ensures that the timer_destroy syscall has completed
before the library timer_destroy function returns, in case it matters.
arch/i386/bits/alltypes.h.sh
arch/x86_64/bits/alltypes.h.sh
src/time/timer_create.c
src/time/timer_delete.c
src/time/timer_getoverrun.c
src/time/timer_gettime.c
src/time/timer_settime.c