From 046c23f567a17758d762a33bdf04bacbfd088f9f Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 7 Jan 2023 10:54:01 -0700 Subject: Kernel+LibC: Move LibC/signal_numbers.h to Kernel/API/POSIX Make Userland and Tests users just include signal.h, and move Kernel users to the new API file. --- Kernel/API/POSIX/signal.h | 1 + Kernel/API/POSIX/signal_numbers.h | 42 +++++++++++++++++++++++++++++++ Kernel/Process.h | 1 - Kernel/TTY/MasterPTY.cpp | 2 +- Kernel/TTY/TTY.cpp | 2 +- Kernel/Thread.cpp | 2 +- Kernel/Thread.h | 2 +- Tests/Kernel/TestKernelAlarm.cpp | 1 - Userland/Libraries/LibC/signal.h | 1 - Userland/Libraries/LibC/signal_numbers.h | 42 ------------------------------- Userland/Libraries/LibCoredump/Reader.cpp | 2 +- Userland/Utilities/tt.cpp | 2 +- 12 files changed, 49 insertions(+), 51 deletions(-) create mode 100644 Kernel/API/POSIX/signal_numbers.h delete mode 100644 Userland/Libraries/LibC/signal_numbers.h diff --git a/Kernel/API/POSIX/signal.h b/Kernel/API/POSIX/signal.h index 4d9d680520..72ec996f24 100644 --- a/Kernel/API/POSIX/signal.h +++ b/Kernel/API/POSIX/signal.h @@ -6,6 +6,7 @@ #pragma once +#include #include #ifdef __cplusplus diff --git a/Kernel/API/POSIX/signal_numbers.h b/Kernel/API/POSIX/signal_numbers.h new file mode 100644 index 0000000000..17ee5bd9d4 --- /dev/null +++ b/Kernel/API/POSIX/signal_numbers.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018-2020, Andreas Kling + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#define SIGINVAL 0 +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGINFO 30 +#define SIGSYS 31 +#define SIGCANCEL 32 +#define NSIG 33 diff --git a/Kernel/Process.h b/Kernel/Process.h index acdc1dcbc3..72f65b004c 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -38,7 +38,6 @@ #include #include #include -#include namespace Kernel { diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index f8b9447540..5c4253a061 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -5,13 +5,13 @@ */ #include +#include #include #include #include #include #include #include -#include #include namespace Kernel { diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index 25b6d71fc0..59c2b47981 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -8,11 +8,11 @@ #include #include #include +#include #include #include #include #include -#include #include #define TTYDEFCHARS #include diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index f7fcf51fbd..3f892fad61 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include namespace Kernel { diff --git a/Kernel/Thread.h b/Kernel/Thread.h index 0bbbf4a16a..b8b2a55e1e 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include namespace Kernel { diff --git a/Tests/Kernel/TestKernelAlarm.cpp b/Tests/Kernel/TestKernelAlarm.cpp index 3d4fae0b1a..843d8ecaf8 100644 --- a/Tests/Kernel/TestKernelAlarm.cpp +++ b/Tests/Kernel/TestKernelAlarm.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include class SuccessContext { diff --git a/Userland/Libraries/LibC/signal.h b/Userland/Libraries/LibC/signal.h index 87012a41a3..4aa0048733 100644 --- a/Userland/Libraries/LibC/signal.h +++ b/Userland/Libraries/LibC/signal.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/Userland/Libraries/LibC/signal_numbers.h b/Userland/Libraries/LibC/signal_numbers.h deleted file mode 100644 index 17ee5bd9d4..0000000000 --- a/Userland/Libraries/LibC/signal_numbers.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2018-2020, Andreas Kling - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#pragma once - -#define SIGINVAL 0 -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGINFO 30 -#define SIGSYS 31 -#define SIGCANCEL 32 -#define NSIG 33 diff --git a/Userland/Libraries/LibCoredump/Reader.cpp b/Userland/Libraries/LibCoredump/Reader.cpp index 9fd13b2b6a..a6cc8bc24e 100644 --- a/Userland/Libraries/LibCoredump/Reader.cpp +++ b/Userland/Libraries/LibCoredump/Reader.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/Userland/Utilities/tt.cpp b/Userland/Utilities/tt.cpp index e645b4da85..9e74ce7f7b 100644 --- a/Userland/Utilities/tt.cpp +++ b/Userland/Utilities/tt.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3