summaryrefslogtreecommitdiffhomepage
path: root/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
commit5339d016c07bf717ee388f4feb73544087324af0 (patch)
tree94be6f67ed626091f24aee24ec3b3be03d01e4e7 /HALKit/Alpha/CoreSyscallHandlerDEC.cpp
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'HALKit/Alpha/CoreSyscallHandlerDEC.cpp')
-rw-r--r--HALKit/Alpha/CoreSyscallHandlerDEC.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/HALKit/Alpha/CoreSyscallHandlerDEC.cpp b/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
new file mode 100644
index 00000000..d1c656d6
--- /dev/null
+++ b/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
@@ -0,0 +1,21 @@
+/*
+ * ========================================================
+ *
+ * hCore
+ * Copyright Mahrouss Logic, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <ArchKit/Arch.hpp>
+#include <HALKit/Alpha/Processor.hpp>
+
+hCore::Array<void (*)(hCore::Int32 id, hCore::HAL::StackFrame *), kMaxSyscalls> kSyscalls;
+
+extern "C" void rt_syscall_handle(hCore::HAL::StackFrame *stack)
+{
+ for (hCore::SizeT index = 0UL; index < kMaxSyscalls; ++index)
+ {
+ (kSyscalls[index].Leak().Leak())(stack->ID, stack);
+ }
+}