[Glibc-bsd-commits] r4504 - in trunk/glibc-ports/linuxthreads/sysdeps: i386 pthread pthread/bits unix/sysv/linux unix/sysv/linux/i386 x86_64
Petr Salinger
ps-guest at alioth.debian.org
Thu May 30 16:57:03 UTC 2013
Author: ps-guest
Date: 2013-05-30 16:57:03 +0000 (Thu, 30 May 2013)
New Revision: 4504
Modified:
trunk/glibc-ports/linuxthreads/sysdeps/i386/tls.h
trunk/glibc-ports/linuxthreads/sysdeps/i386/useldt.h
trunk/glibc-ports/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
trunk/glibc-ports/linuxthreads/sysdeps/pthread/errno-loc.c
trunk/glibc-ports/linuxthreads/sysdeps/pthread/herrno-loc.c
trunk/glibc-ports/linuxthreads/sysdeps/pthread/res-state.c
trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c
trunk/glibc-ports/linuxthreads/sysdeps/x86_64/tls.h
Log:
part 2 of "these are now mandatory":
USE___THREAD
HAVE_TLS_SUPPORT
FLOATING_STACKS
USE_TLS
HAVE___THREAD
HAVE_Z_NODELETE
__ASSUME_REALTIME_SIGNALS
Modified: trunk/glibc-ports/linuxthreads/sysdeps/i386/tls.h
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/i386/tls.h 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/i386/tls.h 2013-05-30 16:57:03 UTC (rev 4504)
@@ -56,18 +56,6 @@
# include <tcb-offsets.h>
#endif
-/* We can support TLS only if the floating-stack support is available.
- However, we want to compile in the support and test at runtime whether
- the running kernel can support it or not. To avoid bothering with the
- TLS support code at all, use configure --without-tls.
-
- We need USE_TLS to be consistently defined, for ldsodefs.h conditionals.
- But some of the code below can cause problems in building libpthread
- (e.g. useldt.h will defined FLOATING_STACKS when it shouldn't). */
-
-#if defined HAVE_TLS_SUPPORT \
- && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
-
/* Signal that TLS support is available. */
# define USE_TLS 1
@@ -240,8 +228,6 @@
((descr)->p_header.data.pointer_guard \
= THREAD_GETMEM (THREAD_SELF, p_header.data.pointer_guard))
-
-# endif /* HAVE_TLS_SUPPORT && (FLOATING_STACKS || !IS_IN_libpthread) */
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
Modified: trunk/glibc-ports/linuxthreads/sysdeps/i386/useldt.h
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/i386/useldt.h 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/i386/useldt.h 2013-05-30 16:57:03 UTC (rev 4504)
@@ -87,12 +87,7 @@
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
# define DO_SET_THREAD_AREA_REUSE(nr) 1
-#else
-/* Without TLS, we do the initialization of the main thread, where NR == 0. */
-# define DO_SET_THREAD_AREA_REUSE(nr) (!__builtin_constant_p (nr) || (nr))
-#endif
#define DO_SET_THREAD_AREA(descr, nr) \
({ \
int __gs; \
Modified: trunk/glibc-ports/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2013-05-30 16:57:03 UTC (rev 4504)
@@ -23,37 +23,7 @@
#include <linuxthreads/descr.h>
#include <tls.h>
-#if USE_TLS && HAVE___THREAD
-
/* When __thread works, the generic definition is what we want. */
# include_next <bits/libc-tsd.h>
-#else
-
-# include <bits/libc-lock.h>
-
-# ifndef SHARED
-extern void ** __pthread_internal_tsd_address (int);
-extern void *__pthread_internal_tsd_get (int);
-extern int __pthread_internal_tsd_set (int, const void *);
-
-weak_extern (__pthread_internal_tsd_address)
-weak_extern (__pthread_internal_tsd_get)
-weak_extern (__pthread_internal_tsd_set)
-# endif
-
-#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
-#define __libc_tsd_address(KEY) \
- __libc_maybe_call2 (pthread_internal_tsd_address, \
- (_LIBC_TSD_KEY_##KEY), &__libc_tsd_##KEY##_data)
-#define __libc_tsd_get(KEY) \
- __libc_maybe_call2 (pthread_internal_tsd_get, \
- (_LIBC_TSD_KEY_##KEY), __libc_tsd_##KEY##_data)
-#define __libc_tsd_set(KEY, VALUE) \
- __libc_maybe_call2 (pthread_internal_tsd_set, \
- (_LIBC_TSD_KEY_##KEY, (VALUE)), \
- (__libc_tsd_##KEY##_data = (VALUE), 0))
-
-#endif
-
#endif /* bits/libc-tsd.h */
Modified: trunk/glibc-ports/linuxthreads/sysdeps/pthread/errno-loc.c
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/pthread/errno-loc.c 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/pthread/errno-loc.c 2013-05-30 16:57:03 UTC (rev 4504)
@@ -23,24 +23,9 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
-#undef errno
-extern int errno;
-#endif
-
int *
-#if ! USE___THREAD
-weak_const_function
-#endif
__errno_location (void)
{
-#if ! USE___THREAD && !defined NOT_IN_libc
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_errnop);
- }
-#endif
return &errno;
}
libc_hidden_def (__errno_location)
Modified: trunk/glibc-ports/linuxthreads/sysdeps/pthread/herrno-loc.c
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/pthread/herrno-loc.c 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/pthread/herrno-loc.c 2013-05-30 16:57:03 UTC (rev 4504)
@@ -21,23 +21,11 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
-# undef h_errno
-extern int h_errno;
-#endif
-
/* When threaded, h_errno may be a per-thread variable. */
int *
weak_const_function
__h_errno_location (void)
{
-#if ! USE___THREAD
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_h_errnop);
- }
-#endif
return &h_errno;
}
libc_hidden_def (__h_errno_location)
Modified: trunk/glibc-ports/linuxthreads/sysdeps/pthread/res-state.c
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/pthread/res-state.c 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/pthread/res-state.c 2013-05-30 16:57:03 UTC (rev 4504)
@@ -21,27 +21,10 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
-# undef _res
-extern struct __res_state _res;
-#endif
-
/* When threaded, _res may be a per-thread variable. */
struct __res_state *
-#if ! USE___THREAD
-weak_const_function
-#endif
__res_state (void)
{
-#if ! USE___THREAD
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_resp);
- }
- return &_res;
-#else
return __resp;
-#endif
}
libc_hidden_def (__res_state)
Modified: trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2013-05-30 16:57:03 UTC (rev 4504)
@@ -140,7 +140,7 @@
#endif
# ifndef __ASSEMBLER__
-# if defined FLOATING_STACKS && USE___THREAD && defined PIC
+# if defined PIC
# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
p_header.data.multiple_threads) == 0, 1)
@@ -156,27 +156,8 @@
# else
# if !defined PIC
# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
-# elif defined FLOATING_STACKS && USE___THREAD
-# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
# else
-# if !defined NOT_IN_libc || defined IS_IN_libpthread
-# define __SINGLE_THREAD_CMP cmpl $0, __local_multiple_threads at GOTOFF(%ecx)
-# else
-# define __SINGLE_THREAD_CMP \
- movl __local_multiple_threads at GOT(%ecx), %ecx;\
- cmpl $0, (%ecx)
-# endif
-# if !defined HAVE_HIDDEN || !USE___THREAD
-# define SINGLE_THREAD_P \
- SETUP_PIC_REG (cx); \
- addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
- __SINGLE_THREAD_CMP
-# else
-# define SINGLE_THREAD_P \
- call __i686.get_pc_thunk.cx; \
- addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
- __SINGLE_THREAD_CMP
-# endif
+# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
# endif
# endif
Modified: trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2013-05-30 16:57:03 UTC (rev 4504)
@@ -32,11 +32,7 @@
#ifdef __NR_vfork
# ifdef SHARED
-# if !defined HAVE_HIDDEN || !USE___THREAD
SETUP_PIC_REG (cx)
-# else
- call __i686.get_pc_thunk.cx
-# endif
addl $_GLOBAL_OFFSET_TABLE_, %ecx
cmpl $0, __libc_pthread_functions at GOTOFF(%ecx)
# else
Modified: trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2013-05-30 16:57:03 UTC (rev 4504)
@@ -31,26 +31,5 @@
__pthread_sigsuspend (const sigset_t *set)
{
INTERNAL_SYSCALL_DECL (err);
-#if !__ASSUME_REALTIME_SIGNALS
- static int __pthread_missing_rt_sigs;
-
-# ifdef __NR_rt_sigsuspend
- /* First try the RT signals. */
- if (!__pthread_missing_rt_sigs)
- {
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- int r;
- r = INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8);
- if (INTERNAL_SYSCALL_ERRNO (r, err) != ENOSYS)
- return;
-
- __pthread_missing_rt_sigs = 1;
- }
-# endif
-
- INTERNAL_SYSCALL (sigsuspend, err, 3, 0, 0, set->__val[0]);
-#else
INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8);
-#endif
}
Modified: trunk/glibc-ports/linuxthreads/sysdeps/x86_64/tls.h
===================================================================
--- trunk/glibc-ports/linuxthreads/sysdeps/x86_64/tls.h 2013-05-30 16:21:27 UTC (rev 4503)
+++ trunk/glibc-ports/linuxthreads/sysdeps/x86_64/tls.h 2013-05-30 16:57:03 UTC (rev 4504)
@@ -55,9 +55,6 @@
# include <tcb-offsets.h>
#endif
-
-#ifdef HAVE_TLS_SUPPORT
-
/* Signal that TLS support is available. */
# define USE_TLS 1
@@ -147,7 +144,6 @@
((descr)->p_header.data.pointer_guard \
= THREAD_GETMEM (THREAD_SELF, p_header.data.pointer_guard))
-# endif /* HAVE_TLS_SUPPORT */
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
More information about the Glibc-bsd-commits
mailing list