Kernel: Cleanup signal trampoline

This commit is contained in:
Bananymous 2023-07-30 15:58:35 +03:00
parent 6f7d97cf94
commit 08cdf88586
3 changed files with 5 additions and 13 deletions

View File

@ -46,7 +46,6 @@ set(KERNEL_SOURCES
kernel/Scheduler.cpp kernel/Scheduler.cpp
kernel/Semaphore.cpp kernel/Semaphore.cpp
kernel/Serial.cpp kernel/Serial.cpp
kernel/Signal.cpp
kernel/SpinLock.cpp kernel/SpinLock.cpp
kernel/SSP.cpp kernel/SSP.cpp
kernel/Storage/ATABus.cpp kernel/Storage/ATABus.cpp

View File

@ -1,5 +1,7 @@
.section .userspace, "aw" .section .userspace, "aw"
#include <sys/syscall.h>
.global signal_trampoline .global signal_trampoline
signal_trampoline: signal_trampoline:
pushq %rax pushq %rax
@ -18,14 +20,13 @@ signal_trampoline:
pushq %r14 pushq %r14
pushq %r15 pushq %r15
xchgw %bx, %bx
movq 128(%rsp), %rdi movq 128(%rsp), %rdi
movq 120(%rsp), %rax movq 120(%rsp), %rax
call *%rax call *%rax
movq 128(%rsp), %rdi movq $SYS_SIGNAL_DONE, %rax
call signal_done movq 128(%rsp), %rbx
int $0x80
popq %r15 popq %r15
popq %r14 popq %r14

View File

@ -1,8 +0,0 @@
#include <sys/syscall.h>
#include <kernel/Syscall.h>
extern "C" __attribute__((section(".userspace")))
void signal_done(int signal)
{
Kernel::syscall(SYS_SIGNAL_DONE, signal);
}