diff options
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r-- | nptl/sysdeps/pthread/posix-timer.h | 22 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/timer_create.c | 2 |
2 files changed, 3 insertions, 21 deletions
diff --git a/nptl/sysdeps/pthread/posix-timer.h b/nptl/sysdeps/pthread/posix-timer.h index bfa8f65c40..5a58b5a814 100644 --- a/nptl/sysdeps/pthread/posix-timer.h +++ b/nptl/sysdeps/pthread/posix-timer.h @@ -101,26 +101,8 @@ extern struct thread_node __timer_signal_thread_tclk; /* Return pointer to timer structure corresponding to ID. */ -#if 0 -static inline struct timer_node * -timer_id2ptr (timer_t timerid) -{ - if (timerid >= 0 && timerid < TIMER_MAX) - return &__timer_array[timerid]; - - return NULL; -} - -/* Return ID of TIMER. */ -static inline int -timer_ptr2id (struct timer_node *timer) -{ - return timer - __timer_array; -} -#else -# define timer_id2ptr(timerid) ((struct timer_node *) timerid) -# define timer_ptr2id(timerid) ((void *) timerid) -#endif +#define timer_id2ptr(timerid) ((struct timer_node *) timerid) +#define timer_ptr2id(timerid) ((void *) timerid) /* Check whether timer is valid; global mutex must be held. */ static inline int diff --git a/nptl/sysdeps/pthread/timer_create.c b/nptl/sysdeps/pthread/timer_create.c index 795f94c7d2..4ee0966f4e 100644 --- a/nptl/sysdeps/pthread/timer_create.c +++ b/nptl/sysdeps/pthread/timer_create.c @@ -81,7 +81,7 @@ timer_create (clock_id, evp, timerid) { newtimer->event.sigev_notify = SIGEV_SIGNAL; newtimer->event.sigev_signo = SIGALRM; - newtimer->event.sigev_value.sival_int = timer_ptr2id (newtimer); + newtimer->event.sigev_value.sival_ptr = timer_ptr2id (newtimer); newtimer->event.sigev_notify_function = 0; } |