summaryrefslogtreecommitdiff
path: root/src/time/timer_create.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-03 12:03:58 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-03 12:03:58 -0400
commitf01d35184291c650f6a38f8b3da41693bfde0e70 (patch)
tree6ac03fcfbcde4312e0d97cfba474427e18e18089 /src/time/timer_create.c
parent06baa2b56cc64ec974f0dc6e67001d0cfa030826 (diff)
downloadmusl-f01d35184291c650f6a38f8b3da41693bfde0e70.tar.gz
musl-f01d35184291c650f6a38f8b3da41693bfde0e70.tar.bz2
musl-f01d35184291c650f6a38f8b3da41693bfde0e70.tar.xz
musl-f01d35184291c650f6a38f8b3da41693bfde0e70.zip
simplify calling of timer signal handler
Diffstat (limited to 'src/time/timer_create.c')
-rw-r--r--src/time/timer_create.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/time/timer_create.c b/src/time/timer_create.c
index c5894f48..f02abb86 100644
--- a/src/time/timer_create.c
+++ b/src/time/timer_create.c
@@ -13,10 +13,9 @@ struct start_args {
struct sigevent *sev;
};
-static void sighandler(int sig, siginfo_t *si, void *ctx)
+void __sigtimer_handler(pthread_t self)
{
int st;
- pthread_t self = __pthread_self();
void (*notify)(union sigval) = (void (*)(union sigval))self->start;
union sigval val = { .sival_ptr = self->start_arg };
@@ -72,7 +71,6 @@ int timer_create(clockid_t clk, struct sigevent *evp, timer_t *res)
*res = (void *)(2*timerid+1);
break;
case SIGEV_THREAD:
- if (!libc.sigtimer) libc.sigtimer = sighandler;
if (sev.sigev_notify_attributes)
attr = *sev.sigev_notify_attributes;
else