From da70596895d8135e08f8caac6978117697b4c021 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 Aug 2024 21:39:29 +0200 Subject: [REFACTOR] Improved project structure. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp (limited to 'dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp') diff --git a/dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp new file mode 100644 index 00000000..9d20a0f3 --- /dev/null +++ b/dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp @@ -0,0 +1,24 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include +#include + +/// @brief Internal call for syscall, to work with C++. +/// @param stack +/// @return nothing. +EXTERN_C void rt_syscall_handle(Kernel::HAL::StackFrame* stack) +{ + if (stack->Rcx <= (kSyscalls.Count() - 1)) + { + Kernel::kcout << "newoskrnl: syscall: enter.\r"; + + if (kSyscalls[stack->Rcx].Leak().Leak().fHooked) + (kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack); + + Kernel::kcout << "newoskrnl: syscall: exit.\r"; + } +} -- cgit v1.2.3