diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-06-19 07:59:04 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-06-19 07:59:04 +0000 |
| commit | b820eb6a5a7948597d81998137b05ddc0eb0dbad (patch) | |
| tree | db4eaea0b6863076c4f1476f361e2317823a663a /Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp | |
| parent | 36ff25861676cd1f5fb94b901fa59b015c614bc5 (diff) | |
| parent | 6735570c44516661260546dadb81f0f5c238d1db (diff) | |
Merged in MHR-31 (pull request #16)
MHR-31: Round robin scheduler.
Diffstat (limited to 'Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp')
| -rw-r--r-- | Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp index ea0997ed..f308b0b5 100644 --- a/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp +++ b/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp @@ -5,16 +5,20 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.hpp> -#include <HALKit/Alpha/Processor.hpp> +#include <HALKit/AXP/Processor.hpp> -NewOS::Array<void (*)(NewOS::Int32 id, NewOS::HAL::StackFrame*), - kKernelMaxSystemCalls> - kSyscalls; - -extern "C" void rt_syscall_handle(NewOS::HAL::StackFrame* stack) +/// @brief Internal call for syscall, to work with C++. +/// @param stack +/// @return nothing. +EXTERN_C void rt_syscall_handle(NewOS::HAL::StackFrame* stack) { - for (NewOS::SizeT index = 0UL; index < kKernelMaxSystemCalls; ++index) + if (stack->Rcx <= (kSyscalls.Count() - 1)) { - (kSyscalls[index].Leak().Leak())(stack->ID, stack); + NewOS::kcout << "newoskrnl: syscall: enter.\r"; + + if (kSyscalls[stack->Rcx].Leak().Leak().fHooked) + (kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack); + + NewOS::kcout << "newoskrnl: syscall: exit.\r"; } } |
