summaryrefslogtreecommitdiffhomepage
path: root/dev/zka/HALKit/AXP/CoreSyscallHandlerDEC.cpp
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-09-22 17:46:11 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-09-22 17:46:11 +0200
commit8719b4570a2d10dd49a0d3a47e24f5c55bdda85e (patch)
treeba095740888f3768e08b2ea058b0ea6da2d0403d /dev/zka/HALKit/AXP/CoreSyscallHandlerDEC.cpp
parent45944b3d2dab04b763fcc6d10164fe8069e60b08 (diff)
:boom: A big refactor on the filesystem structure.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/zka/HALKit/AXP/CoreSyscallHandlerDEC.cpp')
-rw-r--r--dev/zka/HALKit/AXP/CoreSyscallHandlerDEC.cpp24
1 files changed, 24 insertions, 0 deletions
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 <ArchKit/ArchKit.hxx>
+#include <HALKit/AXP/Processor.hxx>
+
+/// @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";
+ }
+}