summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/HALKit/AXP/CoreSyscallHandlerDEC.cpp
diff options
context:
space:
mode:
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..9d20a0f3
--- /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))
+ {
+ 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";
+ }
+}