__libc_cleanup_pop_restore;
__libc_cleanup_push_defer;
__libc_dl_error_tsd;
+ __libc_multiple_threads;
__libc_pthread_init;
__lll_clocklock_elision;
__lll_lock_elision;
/* This is at least the second thread. */
pd->header.multiple_threads = 1;
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
- __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
+ __pthread_multiple_threads = __libc_multiple_threads = 1;
#endif
#ifdef NEED_DL_SYSINFO
/* This is at least the second thread. */
pd->header.multiple_threads = 1;
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
- __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
+ __pthread_multiple_threads = __libc_multiple_threads = 1;
#endif
#ifdef NEED_DL_SYSINFO
/* Variable set to a nonzero value either if more than one thread runs or ran,
or if a single-threaded process is trying to cancel itself. See
nptl/descr.h for more context on the single-threaded process case. */
-int __libc_multiple_threads attribute_hidden;
+int __libc_multiple_threads __attribute__ ((nocommon));
+libc_hidden_data_def (__libc_multiple_threads)
# endif
#endif
#include <sysdep.h>
#include <ldsodefs.h>
-
-#ifdef TLS_MULTIPLE_THREADS_IN_TCB
void
-#else
-extern int __libc_multiple_threads attribute_hidden;
-
-int *
-#endif
__libc_pthread_init (void (*reclaim) (void))
{
/* Called by a child after fork. */
__register_atfork (NULL, NULL, reclaim, NULL);
-
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
- return &__libc_multiple_threads;
-#endif
}
#include <libc-pointer-arith.h>
#include <pthread_mutex_conf.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;
#endif
/* Register the fork generation counter with the libc. */
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
- __libc_multiple_threads_ptr =
-#endif
- __libc_pthread_init (__reclaim_stacks);
+ __libc_pthread_init (__reclaim_stacks);
}
strong_alias (__pthread_initialize_minimal_internal,
__pthread_initialize_minimal)
extern unsigned long int *__fork_generation_pointer attribute_hidden;
/* Register the generation counter in the libpthread with the libc. */
-#ifdef TLS_MULTIPLE_THREADS_IN_TCB
extern void __libc_pthread_init (void (*reclaim) (void));
-#else
-extern int *__libc_pthread_init (void (*reclaim) (void));
+#ifndef TLS_MULTIPLE_THREADS_IN_TCB
/* Variable set to a nonzero value either if more than one thread runs or ran,
or if a single-threaded process is trying to cancel itself. See
nptl/descr.h for more context on the single-threaded process case. */
extern int __pthread_multiple_threads attribute_hidden;
-/* Pointer to the corresponding variable in libc. */
-extern int *__libc_multiple_threads_ptr attribute_hidden;
#endif
extern size_t __pthread_get_minstack (const pthread_attr_t *attr);
points get executed. */
THREAD_SETMEM (THREAD_SELF, header.multiple_threads, 1);
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
- __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
+ __pthread_multiple_threads = __libc_multiple_threads = 1;
#endif
}
/* Mark the thread as canceled. This has to be done
The ABI might define SINGLE_THREAD_BY_GLOBAL to enable the single thread
check to use global variables instead of the pthread_t field. */
+#ifndef __ASSEMBLER__
+extern int __libc_multiple_threads;
+libc_hidden_proto (__libc_multiple_threads)
+#endif
+
#ifdef SINGLE_THREAD_BY_GLOBAL
# if IS_IN (libc)
-extern int __libc_multiple_threads;
# define SINGLE_THREAD_P \
__glibc_likely (__libc_multiple_threads == 0)
# elif IS_IN (libpthread)