blob: 3e8544e722b17267bd6aca0ee365bdc213b3c360 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* ========================================================
*
* hCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
*/
#include <KernelKit/PermissionSelector.hxx>
#include <HALKit/AMD64/Processor.hpp>
#include <ArchKit/Arch.hpp>
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);
}
}
|