summaryrefslogtreecommitdiff
path: root/sysdeps/generic/ldsodefs.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2021-09-15 20:11:08 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-09-16 01:04:05 +0200
commit166bb3eac351b88191d440b0fe8d5d7b757eaed0 (patch)
tree2a0366c36387bcee5c4ae2704ccca394cd969f48 /sysdeps/generic/ldsodefs.h
parent4b6574a6f63b6c766f27be4a0b4c9376a35a4bd5 (diff)
downloadglibc-166bb3eac351b88191d440b0fe8d5d7b757eaed0.tar.gz
htl: Move thread table to ld.so
The next commit is going to introduce a new implementation of THREAD_GSCOPE_WAIT which needs to access the list of threads. Since it must be usable from the dynamic laoder, we have to move the symbols for the list of threads into the loader. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20210915171110.226187-2-bugaevc@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'sysdeps/generic/ldsodefs.h')
-rw-r--r--sysdeps/generic/ldsodefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 02bd579ef8..f01b601d63 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -486,7 +486,16 @@ struct rtld_global
/* Mutex protecting the stack lists. */
EXTERN int _dl_stack_cache_lock;
+#else
+ /* The total number of thread IDs currently in use, or on the list of
+ available thread IDs. */
+ EXTERN int _dl_pthread_num_threads;
+
+ /* Array of __pthread structures and its lock. */
+ EXTERN struct __pthread **_dl_pthread_threads;
+ __libc_rwlock_define (EXTERN, _dl_pthread_threads_lock)
#endif
+
#if !THREAD_GSCOPE_IN_TCB
EXTERN int _dl_thread_gscope_count;
#endif