diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-25 11:33:06 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-25 11:33:06 +0100 |
commit | c11511a0aba0745aae4175d2566466462777b9e5 (patch) | |
tree | bbb5e3fdc779951d3bb05694daaf4d3b13250cea /Kernel | |
parent | 3c9cebea6e4a449f24b54acac1b20baf72a800e2 (diff) | |
download | serenity-c11511a0aba0745aae4175d2566466462777b9e5.zip |
Kernel: Move sys$sigaction() implementation inside ARCH(i386)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/sigaction.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Kernel/Syscalls/sigaction.cpp b/Kernel/Syscalls/sigaction.cpp index a3cfc9d1bf..3bd36453bc 100644 --- a/Kernel/Syscalls/sigaction.cpp +++ b/Kernel/Syscalls/sigaction.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <Kernel/Panic.h> #include <Kernel/Process.h> namespace Kernel { @@ -87,11 +88,12 @@ int Process::sys$sigaction(int signum, const sigaction* act, sigaction* old_act) return 0; } -int Process::sys$sigreturn(RegisterState& registers) +int Process::sys$sigreturn([[maybe_unused]] RegisterState& registers) { REQUIRE_PROMISE(stdio); SmapDisabler disabler; +#if ARCH(I386) //Here, we restore the state pushed by dispatch signal and asm_signal_trampoline. u32* stack_ptr = (u32*)registers.userspace_esp; u32 smuggled_eax = *stack_ptr; @@ -114,6 +116,9 @@ int Process::sys$sigreturn(RegisterState& registers) registers.userspace_esp = registers.esp; return smuggled_eax; +#else + PANIC("sys$sigreturn() not implemented."); +#endif } } |