]> Git Repo - uclibc-ng.git/commitdiff
linuxthreads: guard *tsd* related stuff correctly
authorPeter S. Mazinger <[email protected]>
Sat, 7 May 2011 22:23:14 +0000 (00:23 +0200)
committerBernhard Reutner-Fischer <[email protected]>
Fri, 15 Jun 2012 12:00:44 +0000 (14:00 +0200)
Signed-off-by: Peter S. Mazinger <[email protected]>
Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
libpthread/linuxthreads/internals.h
libpthread/linuxthreads/pthread.c
libpthread/linuxthreads/specific.c
libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h

index 31d859ec3eda5b448f4b4088877780f7aa169027..bee7eb1be2fbd56de72e0c2b780dda5e50e7b106 100644 (file)
@@ -30,12 +30,11 @@ enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
                        _LIBC_TSD_KEY_CTYPE_TOUPPER,
                        _LIBC_TSD_KEY_N };
 
-#include <sys/cdefs.h>
-#include <tls.h>
-
+#include <features.h>
 #include <linuxthreads.old/internals.h>
 
-#if defined(USE_TLS) && USE_TLS && HAVE___THREAD
+#ifdef __UCLIBC_HAS_TLS__
+#include <tls.h>
 
 /* When __thread works, the generic definition is what we want.  */
 # include <sysdeps/generic/bits/libc-tsd.h>
index e855f506248cd7f42ff590f95ba9787e2bd7dd1b..4ce39fb4bd27cac465d98387ae1ad33146969136 100644 (file)
@@ -438,10 +438,12 @@ extern void __linuxthreads_reap_event (void);
 extern void __pthread_initialize (void);
 
 /* TSD.  */
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
 extern int __pthread_internal_tsd_set (int key, const void * pointer);
 extern void * __pthread_internal_tsd_get (int key);
 extern void ** __attribute__ ((__const__))
   __pthread_internal_tsd_address (int key);
+#endif
 
 /* Sighandler wrappers.  */
 extern void __pthread_sighandler(int signo, SIGCONTEXT ctx);
index 043146bfa4361f24cbcee7e7165a5607305c9982..5dccd939f80c7bfbd1f3d1efa628afee73af76d5 100644 (file)
@@ -230,7 +230,7 @@ extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign);
 
 struct pthread_functions __pthread_functions =
   {
-#ifndef __UCLIBC_HAS_TLS__
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
     .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
     .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
     .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
index 4a6dad308a529fd6ccc9140d5494580c69b4ea86..0daad83f50dcc48b2e3f36ffafc5438a327c0185 100644 (file)
@@ -212,7 +212,7 @@ void __pthread_destroy_specifics()
   __pthread_unlock(THREAD_GETMEM(self, p_lock));
 }
 
-#ifndef __UCLIBC_HAS_TLS__
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
 
 /* Thread-specific data for libc. */
 
index 44677e886e16ff0a4b06e361bd010723ce9348ef..04d45467c7d7106a250832a96ebdcb26700f17d3 100644 (file)
@@ -72,10 +72,12 @@ struct pthread_functions
   void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
                                    char *targetframe);
   pthread_descr (*ptr_pthread_thread_self) (void);
+#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
   int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
   void * (*ptr_pthread_internal_tsd_get) (int key);
   void ** __attribute__ ((__const__))
     (*ptr_pthread_internal_tsd_address) (int key);
+#endif
   int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
                                struct sigaction *oact);
   int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
This page took 0.038511 seconds and 4 git commands to generate.