This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26.9000-1181-g61a3a8c
- From: sthibaul at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Jan 2018 16:21:20 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-1181-g61a3a8c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 61a3a8c6ce4e6d42c900ce83cc69256e0b0589a3 (commit)
from 05ebfe87fa9464f0e414329accd82f20d6ec9946 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61a3a8c6ce4e6d42c900ce83cc69256e0b0589a3
commit 61a3a8c6ce4e6d42c900ce83cc69256e0b0589a3
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat Jan 27 17:17:49 2018 +0100
hurd: fix warning
timer_ptr2id and timer_id2ptr are used to convert between
application-visible timer_t and struct timer_node *. timer_ptr2id was made
to use void * instead of timer_t in 49b650430eb5 ('Update.') for no reason.
It happens that on Linux timer_t is void *, so both that change and this
commit are no-ops there, but not on systems where timer_t is not void *.
Using timer_ptr2id for filling sival_ptr also does not make sense since that
actually is a void *.
* 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 *.
diff --git a/ChangeLog b/ChangeLog
index f2a7717..497b00f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/sysdeps/pthread/posix-timer.h b/sysdeps/pthread/posix-timer.h
index 8231170..d7af9a0 100644
--- a/sysdeps/pthread/posix-timer.h
+++ b/sysdeps/pthread/posix-timer.h
@@ -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
diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c
index 1c80e61..2381a60 100644
--- a/sysdeps/pthread/timer_create.c
+++ b/sysdeps/pthread/timer_create.c
@@ -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;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
sysdeps/pthread/posix-timer.h | 2 +-
sysdeps/pthread/timer_create.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources