[git commit ldso-future 1/1] LT old: use __UCLIBC_HAS_TLS__ instead of USE_TLS

Peter S. Mazinger ps.m at gmx.net
Wed Mar 30 11:53:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=220477e3afc04cc58cf5697429713834e3cf25aa
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/ldso-future

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 libpthread/linuxthreads.old/pthread.c              |    6 +++---
 libpthread/linuxthreads.old/sysdeps/i386/useldt.h  |    2 +-
 .../sysdeps/pthread/bits/libc-tsd.h                |    2 +-
 .../linuxthreads.old_db/td_thr_tls_get_addr.c      |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c
index 652a389..634882b 100644
--- a/libpthread/linuxthreads.old/pthread.c
+++ b/libpthread/linuxthreads.old/pthread.c
@@ -540,7 +540,7 @@ int __pthread_initialize_manager(void)
   }
   /* Start the thread manager */
   pid = 0;
-#if defined(USE_TLS) && USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
   if (__linuxthreads_initial_report_events != 0)
     THREAD_SETMEM (((pthread_descr) NULL), p_report_events,
 		   __linuxthreads_initial_report_events);
@@ -713,7 +713,7 @@ static pthread_descr thread_self_stack(void)
     if (sp >= __pthread_manager_thread_bos && sp < __pthread_manager_thread_tos)
 	return manager_thread;
     h = __pthread_handles + 2;
-# if defined(USE_TLS) && USE_TLS
+# ifdef __UCLIBC_HAS_TLS__
     while (h->h_descr == NULL
 	    || ! (sp <= (char *) h->h_descr->p_stackaddr && sp >= h->h_bottom))
 	h++;
@@ -848,7 +848,7 @@ static void pthread_handle_sigcancel(int sig)
     /* Main thread should accumulate times for thread manager and its
        children, so that timings for main thread account for all threads. */
     if (self == __pthread_main_thread) {
-#if defined(USE_TLS) && USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
       waitpid(__pthread_manager_thread->p_pid, NULL, __WCLONE);
 #else
       waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
diff --git a/libpthread/linuxthreads.old/sysdeps/i386/useldt.h b/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
index ca5677c..74fd00f 100644
--- a/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
+++ b/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
@@ -86,7 +86,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
    because we inherited the value set up in the main thread by TLS setup.
    We need to extract that value and set up the same segment in this
    thread.  */
-#if USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
 # define DO_SET_THREAD_AREA_REUSE(nr)	1
 #else
 /* Without TLS, we do the initialization of the main thread, where NR == 0.  */
diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
index 31d859e..df052c1 100644
--- a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
+++ b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
@@ -35,7 +35,7 @@ enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
 
 #include <linuxthreads.old/internals.h>
 
-#if defined(USE_TLS) && USE_TLS && HAVE___THREAD
+#ifdef __UCLIBC_HAS_TLS__
 
 /* When __thread works, the generic definition is what we want.  */
 # include <sysdeps/generic/bits/libc-tsd.h>
diff --git a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
index 8e38b69..04bdacd 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
+++ b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
@@ -31,7 +31,7 @@ td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)),
 		     size_t offset __attribute__ ((unused)),
 		     void **address __attribute__ ((unused)))
 {
-#if defined(USE_TLS) && USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
   size_t modid;
   union dtv pdtv, *dtvp;
 
-- 
1.7.3.4



More information about the uClibc-cvs mailing list