blob: f9b6717795995b65fc854e50b0b09a796e0cf78b (
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
|
/* -------------------------------------------
Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
------------------------------------------- */
#include <ArchKit/ArchKit.h>
#include <HALKit/AXP/Processor.h>
/// @brief Internal call for syscall, to work with C++.
/// @param stack
/// @return nothing.
EXTERN_C void rt_syscall_handle(Kernel::HAL::StackFrame* stack)
{
if (stack->Rcx <= (kSyscalls.Count() - 1))
{
kcout << "syscall: enter.\r";
if (kSyscalls[stack->Rcx].Leak().Leak().fHooked)
(kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack);
kcout << "syscall: exit.\r";
}
}
|