about summary refs log tree commit diff
path: root/arch/i386/bits
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-30 13:04:55 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-30 13:04:55 -0400
commit3990c5c6a40440cdb14746ac080d0ecf8d5d6733 (patch)
treeb20dd1257972fdbe84202e9b6c913e90c1fa1d54 /arch/i386/bits
parentb8be64c43da207a2f497c1c5b5720e4a2027348a (diff)
downloadmusl-3990c5c6a40440cdb14746ac080d0ecf8d5d6733.tar.gz
musl-3990c5c6a40440cdb14746ac080d0ecf8d5d6733.tar.xz
musl-3990c5c6a40440cdb14746ac080d0ecf8d5d6733.zip
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.
Diffstat (limited to 'arch/i386/bits')
-rwxr-xr-xarch/i386/bits/alltypes.h.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index 13658cc2..c6201b9d 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -107,7 +107,7 @@ TYPEDEF long long blkcnt_t;
 TYPEDEF unsigned long long fsblkcnt_t;
 TYPEDEF unsigned long long fsfilcnt_t;
 
-TYPEDEF struct __timer * timer_t;
+TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
 TYPEDEF unsigned long clock_t;