diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-11-16 19:33:30 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-11-16 19:33:30 +0100 |
commit | 1daccf403b1bd86370eb94edca794dc106d02039 (patch) | |
tree | e54bc8ee71eb92b7114df79e2f378a477c470029 /sysdeps/generic/ldsodefs.h | |
parent | aac0f62c47beee5b546bacc330acc2dd21cda0dc (diff) | |
download | glibc-1daccf403b1bd86370eb94edca794dc106d02039.tar glibc-1daccf403b1bd86370eb94edca794dc106d02039.tar.gz glibc-1daccf403b1bd86370eb94edca794dc106d02039.tar.bz2 glibc-1daccf403b1bd86370eb94edca794dc106d02039.zip |
nptl: Move stack list variables into _rtld_global
Now __thread_gscope_wait (the function behind THREAD_GSCOPE_WAIT,
formerly __wait_lookup_done) can be implemented directly in ld.so,
eliminating the unprotected GL (dl_wait_lookup_done) function
pointer.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/generic/ldsodefs.h')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 382eeb9be0..b1da03cafe 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -38,6 +38,7 @@ #include <libc-lock.h> #include <hp-timing.h> #include <tls.h> +#include <list_t.h> __BEGIN_DECLS @@ -461,15 +462,22 @@ struct rtld_global EXTERN void (*_dl_init_static_tls) (struct link_map *); - EXTERN void (*_dl_wait_lookup_done) (void); - /* Scopes to free after next THREAD_GSCOPE_WAIT (). */ EXTERN struct dl_scope_free_list { size_t count; void *list[50]; } *_dl_scope_free_list; -#if !THREAD_GSCOPE_IN_TCB +#if THREAD_GSCOPE_IN_TCB + /* List of active thread stacks, with memory managed by glibc. */ + EXTERN list_t _dl_stack_used; + + /* List of thread stacks that were allocated by the application. */ + EXTERN list_t _dl_stack_user; + + /* Mutex protecting the stack lists. */ + EXTERN int _dl_stack_cache_lock; +#else EXTERN int _dl_thread_gscope_count; #endif #ifdef SHARED @@ -1252,6 +1260,11 @@ link_map_audit_state (struct link_map *l, size_t index) } #endif /* SHARED */ +#if THREAD_GSCOPE_IN_TCB +void __thread_gscope_wait (void) attribute_hidden; +# define THREAD_GSCOPE_WAIT() __thread_gscope_wait () +#endif + __END_DECLS #endif /* ldsodefs.h */ |