diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-29 13:01:25 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-29 13:01:25 -0400 |
commit | 80c4dcd2535a2d7f01eb539b0358dc51b0c0e122 (patch) | |
tree | 45bd30741a6f37bd0191467663dfbe5fb108c471 /src/time/timer_getoverrun.c | |
parent | bf619d82c82052741323aa63c107fbd346c8aaba (diff) | |
download | musl-80c4dcd2535a2d7f01eb539b0358dc51b0c0e122.tar.gz musl-80c4dcd2535a2d7f01eb539b0358dc51b0c0e122.tar.xz musl-80c4dcd2535a2d7f01eb539b0358dc51b0c0e122.zip |
implement POSIX timers
this implementation is superior to the glibc/nptl implementation, in that it gives true realtime behavior. there is no risk of timer expiration events being lost due to failed thread creation or failed malloc, because the thread is created as time creation time, and reused until the timer is deleted.
Diffstat (limited to 'src/time/timer_getoverrun.c')
-rw-r--r-- | src/time/timer_getoverrun.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/time/timer_getoverrun.c b/src/time/timer_getoverrun.c new file mode 100644 index 00000000..1334e451 --- /dev/null +++ b/src/time/timer_getoverrun.c @@ -0,0 +1,7 @@ +#include <time.h> +#include "pthread_impl.h" + +int timer_getoverrun(timer_t t) +{ + return syscall(SYS_timer_getoverrun, t->timerid); +} |