summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-05-03 23:04:08 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:43 +0200
commita3516fe1a43318dca4e14178142174aa0eed6c30 (patch)
treec8dabe53b20a79c2ab0408cbe0bfde6d142e4786 /libpthread/linuxthreads/sysdeps
parent4b06ff8e51f24313b8a24a2f9e2005ef13848964 (diff)
linuxthreads: use __UCLIBC_HAS_TLS__ consistently
replace USE_TLS, HAVE___THREAD and USE___THREAD with __UCLIBC_HAS_TLS__ Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread/linuxthreads/sysdeps')
-rw-r--r--libpthread/linuxthreads/sysdeps/i386/useldt.h2
-rw-r--r--libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym2
-rw-r--r--libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym2
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h3
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/errno-loc.c6
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c4
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/res-state.c6
-rw-r--r--libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h2
-rw-r--r--libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h2
-rw-r--r--libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym2
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h6
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S2
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h4
13 files changed, 21 insertions, 22 deletions
diff --git a/libpthread/linuxthreads/sysdeps/i386/useldt.h b/libpthread/linuxthreads/sysdeps/i386/useldt.h
index fa9a2a528..c72a7c8f7 100644
--- a/libpthread/linuxthreads/sysdeps/i386/useldt.h
+++ b/libpthread/linuxthreads/sysdeps/i386/useldt.h
@@ -87,7 +87,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 defined (USE_TLS) && 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/sysdeps/ia64/tcb-offsets.sym b/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym
index f7793f766..1000ad0a9 100644
--- a/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym
+++ b/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym
@@ -2,7 +2,7 @@
#include <tls.h>
--
-#ifdef USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads) - sizeof (struct _pthread_descr_struct)
#else
MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
diff --git a/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym b/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym
index 7c5cca01e..7940cf620 100644
--- a/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym
+++ b/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym
@@ -3,7 +3,7 @@
-- This line separates the #include lines from conditionals.
-# ifdef USE_TLS
+# ifdef __UCLIBC_HAS_TLS__
-- Abuse tls.h macros to derive offsets relative to the thread register.
# undef __thread_register
diff --git a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
index fa6eb4be2..6155280b1 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
@@ -21,10 +21,9 @@
#define _BITS_LIBC_TSD_H 1
#include <linuxthreads/descr.h>
+#ifdef __UCLIBC_HAS_TLS__
#include <tls.h>
-#if USE_TLS && HAVE___THREAD
-
/* When __thread works, the generic definition is what we want. */
# include <sysdeps/generic/bits/libc-tsd.h>
diff --git a/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c b/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
index c3b3087e4..69352ea32 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
@@ -22,18 +22,18 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
+#if !defined __UCLIBC_HAS_TLS__ && !RTLD_PRIVATE_ERRNO
#undef errno
extern int errno;
#endif
int *
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
weak_const_function
#endif
__errno_location (void)
{
-#if ! USE___THREAD && !defined NOT_IN_libc
+#if !defined __UCLIBC_HAS_TLS__ && !defined NOT_IN_libc
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();
diff --git a/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c b/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
index fbc557616..5a2657639 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
@@ -21,7 +21,7 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
# undef h_errno
extern int h_errno;
#endif
@@ -31,7 +31,7 @@ int *
weak_const_function
__h_errno_location (void)
{
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();
diff --git a/libpthread/linuxthreads/sysdeps/pthread/res-state.c b/libpthread/linuxthreads/sysdeps/pthread/res-state.c
index 016e20b4e..6eb77637b 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/res-state.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/res-state.c
@@ -21,19 +21,19 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
# undef _res
extern struct __res_state _res;
#endif
/* When threaded, _res may be a per-thread variable. */
struct __res_state *
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
weak_const_function
#endif
__res_state (void)
{
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();
diff --git a/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
index d52d600ad..685d688ae 100644
--- a/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
@@ -58,7 +58,7 @@ testandset (int *spinlock)
#define CURRENT_STACK_FRAME stack_pointer
register char * stack_pointer __asm__ ("15");
-#ifdef USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
/* Return the thread descriptor for the current thread. */
# define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
diff --git a/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
index 187e1f872..366482c0f 100644
--- a/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
@@ -58,7 +58,7 @@ testandset (int *spinlock)
#define CURRENT_STACK_FRAME stack_pointer
register char * stack_pointer __asm__ ("15");
-#ifdef USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
/* Return the thread descriptor for the current thread. */
# define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
diff --git a/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym b/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym
index 328eb0573..6324a016c 100644
--- a/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym
+++ b/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym
@@ -2,7 +2,7 @@
#include <tls.h>
--
-#ifdef USE_TLS
+#ifdef __UCLIBC_HAS_TLS__
MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads)
TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
#else
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
index 0bb16e453..220a925e6 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
@@ -139,7 +139,7 @@
#endif
# ifndef __ASSEMBLER__
-# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
+# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
p_header.data.multiple_threads) == 0, 1)
@@ -155,7 +155,7 @@ extern int __local_multiple_threads
# else
# if !defined __PIC__
# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
-# elif defined FLOATING_STACKS && USE___THREAD
+# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
# else
# if !defined NOT_IN_libc || defined IS_IN_libpthread
@@ -165,7 +165,7 @@ extern int __local_multiple_threads
movl __local_multiple_threads@GOT(%ecx), %ecx;\
cmpl $0, (%ecx)
# endif
-# if !defined HAVE_HIDDEN || !USE___THREAD
+# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
# define SINGLE_THREAD_P \
SETUP_PIC_REG (cx); \
addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
index fec902752..fb7596f27 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
@@ -32,7 +32,7 @@ ENTRY (__vfork)
#ifdef __NR_vfork
# ifdef SHARED
-# if !defined HAVE_HIDDEN || !USE___THREAD
+# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
SETUP_PIC_REG (cx)
# else
call __i686.get_pc_thunk.cx
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
index 48b2caadd..224c0e4d8 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
@@ -155,7 +155,7 @@
# endif
# ifndef __ASSEMBLER__
-# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
+# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
# else
@@ -172,7 +172,7 @@ extern int __local_multiple_threads attribute_hidden;
.align 2; \
1: .long __local_multiple_threads; \
2:
-# elif defined FLOATING_STACKS && USE___THREAD
+# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
# define SINGLE_THREAD_P \
stc gbr,r0; \
mov.w 0f,r1; \