summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
blob: 0881f9c68a5cbd1ff0918b661476f5d1b3be9355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 *	========================================================
 *
 *	HCore
 * 	Copyright 2024 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);
    }
}