From 8719b4570a2d10dd49a0d3a47e24f5c55bdda85e Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 22 Sep 2024 17:46:11 +0200 Subject: :boom: A big refactor on the filesystem structure. Signed-off-by: Amlal --- 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..254e1ab6 --- /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)) + { + kcout << "syscall: enter.\r"; + + if (kSyscalls[stack->Rcx].Leak().Leak().fHooked) + (kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack); + + kcout << "syscall: exit.\r"; + } +} -- cgit v1.2.3