summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp
blob: eac04e4768e053ec6cbf6cce4aac960a54cf5095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* -------------------------------------------

    Copyright Mahrouss Logic

------------------------------------------- */

#include <ArchKit/ArchKit.hpp>
#include <NewKit/Array.hpp>

HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *),
             kKernelMaxSystemCalls>
    kSyscalls;

extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack) {
  for (HCore::SizeT index = 0UL; index < kKernelMaxSystemCalls; ++index) {
    (kSyscalls[index].Leak().Leak())(stack->ID, stack);
  }
}