@@ -13,6 +13,10 @@
return 0.
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Cast
vm_address_t * to ElfW(Addr) * for dl_main parameter.
+ * sysdeps/pthread/posix-timer.h (timer_ptr2id): Cast to timer_t
+ instead of void *.
+ * sysdeps/pthread/timer_create.c (timer_create): Do not use
+ timer_ptr2id to cast struct timer_node * to void *.
2018-01-27 James Clarke <jrtc27@jrtc27.com>
@@ -87,7 +87,7 @@ extern struct thread_node __timer_signal_thread_rclk;
/* Return pointer to timer structure corresponding to ID. */
#define timer_id2ptr(timerid) ((struct timer_node *) timerid)
-#define timer_ptr2id(timerid) ((void *) timerid)
+#define timer_ptr2id(timerid) ((timer_t) timerid)
/* Check whether timer is valid; global mutex must be held. */
static inline int
@@ -77,7 +77,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
{
newtimer->event.sigev_notify = SIGEV_SIGNAL;
newtimer->event.sigev_signo = SIGALRM;
- newtimer->event.sigev_value.sival_ptr = timer_ptr2id (newtimer);
+ newtimer->event.sigev_value.sival_ptr = newtimer;
newtimer->event.sigev_notify_function = 0;
}