public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED PATCH] NPTL: Move __libc_multiple_threads_ptr defn to nptl-init.c
@ 2014-11-12 22:53 Roland McGrath
  0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2014-11-12 22:53 UTC (permalink / raw)
  To: GNU C. Library

There was no rhyme or reason to the placement of this definition.  
Move it to the file where the variable gets initialized.

Verified no code changes on x86_64-linux-gnu (except for assertion line
numbers).


Thanks,
Roland


2014-11-12  Roland McGrath  <roland@hack.frob.com>

	* nptl/createthread.c [!TLS_MULTIPLE_THREADS_IN_TCB]
	(__libc_multiple_threads_ptr): Variable moved ...
	* nptl/nptl-init.c [!TLS_MULTIPLE_THREADS_IN_TCB]: ... here.

--- a/nptl/createthread.c
+++ b/nptl/createthread.c
@@ -36,12 +36,6 @@
 #endif
 
 
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
-/* Pointer to the corresponding variable in libc.  */
-int *__libc_multiple_threads_ptr attribute_hidden;
-#endif
-
-
 static int
 do_clone (struct pthread *pd, const struct pthread_attr *attr,
 	  int clone_flags, int (*fct) (void *), STACK_VARIABLES_PARMS,
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -37,6 +37,11 @@
 #include <kernel-features.h>
 
 
+#ifndef TLS_MULTIPLE_THREADS_IN_TCB
+/* Pointer to the corresponding variable in libc.  */
+int *__libc_multiple_threads_ptr attribute_hidden;
+#endif
+
 /* Size and alignment of static TLS block.  */
 size_t __static_tls_size;
 size_t __static_tls_align_m1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-12 22:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 22:53 [COMMITTED PATCH] NPTL: Move __libc_multiple_threads_ptr defn to nptl-init.c Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).