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.20-94-g674b897
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 17 Oct 2014 22:03:52 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.20-94-g674b897
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 674b89786e04a4addc79d70e025848f1e0116a41 (commit)
from 184ee94010786a9e0952aff3af39eba1d72287d3 (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=674b89786e04a4addc79d70e025848f1e0116a41
commit 674b89786e04a4addc79d70e025848f1e0116a41
Author: Roland McGrath <roland@hack.frob.com>
Date: Fri Oct 17 15:03:00 2014 -0700
NPTL: Clean up THREAD_SYSINFO macros.
diff --git a/ChangeLog b/ChangeLog
index 6a8bda4..78c2d96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2014-10-17 Roland McGrath <roland@hack.frob.com>
+ * sysdeps/i386/nptl/tls.h
+ (THREAD_SELF_SYSINFO, THREAD_SYSINFO): Macros removed.
+ [NEED_DL_SYSINFO] (SETUP_THREAD_SYSINFO, CHECK_THREAD_SYSINFO):
+ New macros.
+ * sysdeps/ia64/nptl/tls.h [NEED_DL_SYSINFO]
+ (SETUP_THREAD_SYSINFO, CHECK_THREAD_SYSINFO): New macros.
+ * nptl/allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]:
+ Call SETUP_THREAD_SYSINFO instead of doing an assignment.
+ * nptl/createthread.c (create_thread) [NEED_DL_SYSINFO]:
+ Call CHECK_THREAD_SYSINFO instead of doing an assert.
+
* nptl/nptl-init.c (__pthread_initialize_minimal_internal):
Conditionalize FUTEX_PRIVATE_FLAG and FUTEX_CLOCK_REALTIME probes
on [__NR_futex].
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index b19d9b3..8cf0274 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -430,8 +430,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
#endif
#ifdef NEED_DL_SYSINFO
- /* Copy the sysinfo value from the parent. */
- THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
+ SETUP_THREAD_SYSINFO (pd);
#endif
/* The process ID is also the same as that of the caller. */
@@ -567,8 +566,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
#endif
#ifdef NEED_DL_SYSINFO
- /* Copy the sysinfo value from the parent. */
- THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
+ SETUP_THREAD_SYSINFO (pd);
#endif
/* Don't allow setxid until cloned. */
diff --git a/nptl/createthread.c b/nptl/createthread.c
index e718e35..9eaf2ce 100644
--- a/nptl/createthread.c
+++ b/nptl/createthread.c
@@ -234,7 +234,7 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
}
#ifdef NEED_DL_SYSINFO
- assert (THREAD_SELF_SYSINFO == THREAD_SYSINFO (pd));
+ CHECK_THREAD_SYSINFO (pd);
#endif
/* Determine whether the newly created threads has to be started
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index a39ec9a..b7d2197 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -304,8 +304,10 @@ __pthread_initialize_minimal_internal (void)
/* Minimal initialization of the thread descriptor. */
struct pthread *pd = THREAD_SELF;
+#ifdef __NR_set_tid_address
INTERNAL_SYSCALL_DECL (err);
pd->pid = pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid);
+#endif
THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]);
THREAD_SETMEM (pd, user_stack, true);
if (LLL_LOCK_INITIALIZER != 0)
diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h
index d7302ba..dd90978 100644
--- a/sysdeps/i386/nptl/tls.h
+++ b/sysdeps/i386/nptl/tls.h
@@ -141,9 +141,6 @@ union user_desc_init
# define GET_DTV(descr) \
(((tcbhead_t *) (descr))->dtv)
-#define THREAD_SELF_SYSINFO THREAD_GETMEM (THREAD_SELF, header.sysinfo)
-#define THREAD_SYSINFO(pd) ((pd)->header.sysinfo)
-
/* Macros to load from and store into segment registers. */
# ifndef TLS_GET_GS
# define TLS_GET_GS() \
@@ -154,9 +151,13 @@ union user_desc_init
__asm ("movw %w0, %%gs" :: "q" (val))
# endif
-#if defined NEED_DL_SYSINFO
+#ifdef NEED_DL_SYSINFO
# define INIT_SYSINFO \
_head->sysinfo = GLRO(dl_sysinfo)
+# define SETUP_THREAD_SYSINFO(pd) \
+ ((pd)->header.sysinfo = THREAD_GETMEM (THREAD_SELF, header.sysinfo))
+# define CHECK_THREAD_SYSINFO(pd) \
+ assert ((pd)->header.sysinfo == THREAD_GETMEM (THREAD_SELF, header.sysinfo))
#else
# define INIT_SYSINFO
#endif
diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h
index e38352a..8805f85 100644
--- a/sysdeps/ia64/nptl/tls.h
+++ b/sysdeps/ia64/nptl/tls.h
@@ -109,8 +109,12 @@ register struct pthread *__thread_self __asm__("r13");
#define THREAD_SYSINFO(pd) \
(((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private)
-#if defined NEED_DL_SYSINFO
+#ifdef NEED_DL_SYSINFO
# define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo)
+# define SETUP_THREAD_SYSINFO(pd) \
+ (THREAD_SYSINFO (pd) = THREAD_SELF_SYSINFO)
+# define CHECK_THREAD_SYSINFO(pd) \
+ assert (THREAD_SYSINFO (pd) == THREAD_SELF_SYSINFO)
#else
# define INIT_SYSINFO NULL
#endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 11 +++++++++++
nptl/allocatestack.c | 6 ++----
nptl/createthread.c | 2 +-
nptl/nptl-init.c | 2 ++
sysdeps/i386/nptl/tls.h | 9 +++++----
sysdeps/ia64/nptl/tls.h | 6 +++++-
6 files changed, 26 insertions(+), 10 deletions(-)
hooks/post-receive
--
GNU C Library master sources