From 08cdf8858673e61415d337233c5da3c1b64281c0 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 30 Jul 2023 15:58:35 +0300 Subject: [PATCH] Kernel: Cleanup signal trampoline --- kernel/CMakeLists.txt | 1 - kernel/arch/x86_64/Signal.S | 9 +++++---- kernel/kernel/Signal.cpp | 8 -------- 3 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 kernel/kernel/Signal.cpp diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 3e744aaf..a5275692 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -46,7 +46,6 @@ set(KERNEL_SOURCES kernel/Scheduler.cpp kernel/Semaphore.cpp kernel/Serial.cpp - kernel/Signal.cpp kernel/SpinLock.cpp kernel/SSP.cpp kernel/Storage/ATABus.cpp diff --git a/kernel/arch/x86_64/Signal.S b/kernel/arch/x86_64/Signal.S index 60546390..2b82cb51 100644 --- a/kernel/arch/x86_64/Signal.S +++ b/kernel/arch/x86_64/Signal.S @@ -1,5 +1,7 @@ .section .userspace, "aw" +#include + .global signal_trampoline signal_trampoline: pushq %rax @@ -18,14 +20,13 @@ signal_trampoline: pushq %r14 pushq %r15 - xchgw %bx, %bx - movq 128(%rsp), %rdi movq 120(%rsp), %rax call *%rax - movq 128(%rsp), %rdi - call signal_done + movq $SYS_SIGNAL_DONE, %rax + movq 128(%rsp), %rbx + int $0x80 popq %r15 popq %r14 diff --git a/kernel/kernel/Signal.cpp b/kernel/kernel/Signal.cpp deleted file mode 100644 index 84eff01d..00000000 --- a/kernel/kernel/Signal.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -extern "C" __attribute__((section(".userspace"))) -void signal_done(int signal) -{ - Kernel::syscall(SYS_SIGNAL_DONE, signal); -}