From a1bdd81664aa681364da368154c48501db249df9 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 21 Apr 2022 09:41:59 -0300 Subject: 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 --- sysdeps/posix/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/posix') diff --git a/sysdeps/posix/signal.c b/sysdeps/posix/signal.c index 8f17b4278d..88c3757126 100644 --- a/sysdeps/posix/signal.c +++ b/sysdeps/posix/signal.c @@ -32,7 +32,7 @@ __bsd_signal (int sig, __sighandler_t handler) /* Check signal extents to protect __sigismember. */ if (handler == SIG_ERR || sig < 1 || sig >= NSIG - || __is_internal_signal (sig)) + || is_internal_signal (sig)) { __set_errno (EINVAL); return SIG_ERR; -- cgit v1.2.3