diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-04-21 09:41:59 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-30 14:56:21 -0300 |
commit | a1bdd81664aa681364da368154c48501db249df9 (patch) | |
tree | 29f01a9ad8bcda2794869dd0555537a2de16fa38 /nptl/descr.h | |
parent | c22d2021a9f9bdea62398976eea4f0e6ef668b7d (diff) | |
download | glibc-a1bdd81664aa681364da368154c48501db249df9.tar.gz glibc-a1bdd81664aa681364da368154c48501db249df9.tar.xz glibc-a1bdd81664aa681364da368154c48501db249df9.zip |
Refactor internal-signals.h
The main drive is to optimize the internal usage and required size when sigset_t is embedded in other data structures. On Linux, the current supported signal set requires up to 8 bytes (16 on mips), was lower than the user defined sigset_t (128 bytes). A new internal type internal_sigset_t is added, along with the functions to operate on it similar to the ones for sigset_t. The internal-signals.h is also refactored to remove unused functions Besides small stack usage on some functions (posix_spawn, abort) it lower the struct pthread by about 120 bytes (112 on mips). Checked on x86_64-linux-gnu. Reviewed-by: Arjun Shankar <arjun@redhat.com>
Diffstat (limited to 'nptl/descr.h')
-rw-r--r-- | nptl/descr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/descr.h b/nptl/descr.h index b5852632e3..5cacb286f3 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -35,6 +35,7 @@ #include <kernel-features.h> #include <tls-internal-struct.h> #include <sys/rseq.h> +#include <internal-sigset.h> #ifndef TCB_ALIGNMENT # define TCB_ALIGNMENT 32 @@ -387,7 +388,7 @@ struct pthread /* Signal mask for the new thread. Used during thread startup to restore the signal mask. (Threads are launched with all signals masked.) */ - sigset_t sigmask; + internal_sigset_t sigmask; /* Indicates whether is a C11 thread created by thrd_creat. */ bool c11; |