blob: ccd81b9a171038338db0e2da8f7482ba4a11580e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*
* ========================================================
*
* hCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
*/
#include <ArchKit/Arch.hpp>
#include <HALKit/AMD64/Processor.hpp>
#include <KernelKit/PermissionSelector.hxx>
hCore::Array<void (*)(hCore::Int32 id, hCore::HAL::StackFrame *), kMaxSyscalls>
kSyscalls;
// IDT System Call Handler.
// NOTE: don't trust the user.
extern "C" void rt_syscall_handle(hCore::HAL::StackFrame *stack) {
for (hCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
(kSyscalls[index].Leak().Leak())(stack->SID, stack);
}
}
|