summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
commit9d124d81f09d2097bfde444b2a6228a725a00efd (patch)
tree6fce1246c4242f911826f81ba827f29374b70031 /sysdeps/generic
parentd017b0ab5a181dce4145f3a1b3b27e3341abd201 (diff)
downloadglibc-9d124d81f09d2097bfde444b2a6228a725a00efd.tar.gz
nptl: Move more stack management variables into _rtld_global
Permissions of the cached stacks may have to be updated if an object is loaded that requires executable stacks, so the dynamic loader needs to know about these cached stacks. The move of in_flight_stack and stack_cache_actsize is a requirement for merging __reclaim_stacks into the fork implementation in libc. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index ee851ac789..81cce2e4d5 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -481,6 +481,17 @@ struct rtld_global
/* List of thread stacks that were allocated by the application. */
EXTERN list_t _dl_stack_user;
+ /* List of queued thread stacks. */
+ EXTERN list_t _dl_stack_cache;
+
+ /* Total size of all stacks in the cache (sum over stackblock_size). */
+ EXTERN size_t _dl_stack_cache_actsize;
+
+ /* We need to record what list operations we are going to do so
+ that, in case of an asynchronous interruption due to a fork()
+ call, we can correct for the work. */
+ EXTERN uintptr_t _dl_in_flight_stack;
+
/* Mutex protecting the stack lists. */
EXTERN int _dl_stack_cache_lock;
#else