From a44c45ff9ef4171ac2d83d3821c96f2a96c6c608 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 13 Nov 2025 04:13:43 +0200 Subject: [PATCH] LibC: Cleanup signal.h Make sa_handler and sa_sigaction be part of an union Add definitions of SIGIO TRAP_BRKPT TRAP_TRACE --- userspace/libraries/LibC/include/signal.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/userspace/libraries/LibC/include/signal.h b/userspace/libraries/LibC/include/signal.h index b3bfa16f..e0b29d26 100644 --- a/userspace/libraries/LibC/include/signal.h +++ b/userspace/libraries/LibC/include/signal.h @@ -92,6 +92,7 @@ struct sigevent #define SIGUSR1 19 #define SIGUSR2 20 #define SIGPOLL 21 +#define SIGIO SIGPOLL #define POLL_IN 1 #define POLL_OUT 2 #define POLL_MSG 3 @@ -101,6 +102,8 @@ struct sigevent #define SIGPROF 22 #define SIGSYS 23 #define SIGTRAP 24 +#define TRAP_BRKPT 1 +#define TRAP_TRACE 2 #define SIGURG 25 #define SIGVTALRM 26 #define SIGXCPU 27 @@ -210,10 +213,13 @@ typedef struct struct sigaction { - void (*sa_handler)(int); /* Pointer to a signal-catching function or one of the SIG_IGN or SIG_DFL. */ - sigset_t sa_mask; /* Set of signals to be blocked during execution of the signal handling function. */ - int sa_flags; /* Special flags. */ - void (*sa_sigaction)(int, siginfo_t*, void*); /* Pointer to a signal-catching function. */ + union + { + void (*sa_handler)(int); /* Pointer to a signal-catching function or one of the SIG_IGN or SIG_DFL. */ + void (*sa_sigaction)(int, siginfo_t*, void*); /* Pointer to a signal-catching function. */ + }; + sigset_t sa_mask; /* Set of signals to be blocked during execution of the signal handling function. */ + int sa_flags; /* Special flags. */ }; int kill(pid_t pid, int sig);