aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/nptl/libc_start_call_main.h13
-rw-r--r--sysdeps/nptl/pthread-functions.h2
2 files changed, 2 insertions, 13 deletions
diff --git a/sysdeps/nptl/libc_start_call_main.h b/sysdeps/nptl/libc_start_call_main.h
index 5218e7a..112cc20 100644
--- a/sysdeps/nptl/libc_start_call_main.h
+++ b/sysdeps/nptl/libc_start_call_main.h
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <atomic.h>
+#include <nptl/pthreadP.h>
_Noreturn static void
__libc_start_call_main (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
@@ -69,17 +70,7 @@ __libc_start_call_main (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
/* One less thread. Decrement the counter. If it is zero we
terminate the entire process. */
result = 0;
-# ifdef SHARED
- unsigned int *ptr = __libc_pthread_functions.ptr_nthreads;
-# ifdef PTR_DEMANGLE
- PTR_DEMANGLE (ptr);
-# endif
-# else
- extern unsigned int __nptl_nthreads __attribute ((weak));
- unsigned int *const ptr = &__nptl_nthreads;
-# endif
-
- if (! atomic_decrement_and_test (ptr))
+ if (! atomic_decrement_and_test (&__nptl_nthreads))
/* Not much left to do but to exit the thread, not the process. */
__exit_thread ();
}
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index 280655f..2fa698b 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -55,8 +55,6 @@ struct pthread_functions
int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
void *(*ptr___pthread_getspecific) (pthread_key_t);
int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
-#define HAVE_PTR_NTHREADS
- unsigned int *ptr_nthreads;
void (*ptr__nptl_deallocate_tsd) (void);
int (*ptr__nptl_setxid) (struct xid_command *);
void (*ptr_set_robust) (struct pthread *);