20 #include "pedigree/kernel/processor/KernelCoreSyscallManager.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/process/Scheduler.h" 23 #include "pedigree/kernel/processor/SyscallManager.h" 24 #include "pedigree/kernel/processor/Syscalls.h" 25 #include "pedigree/kernel/processor/state.h" 37 void KernelCoreSyscallManager::initialise()
39 for (
int i = 0; i < 16; i++)
47 Function_t function, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4,
56 kernelCore,
function, p1, p2, p3, p4, p5);
62 switch (state.getSyscallNumber())
71 if (state.getSyscallNumber() >= 16 ||
75 "KernelCoreSyscallManager: invalid syscall received: " 76 <<
Dec << state.getSyscallNumber());
81 return m_Functions[state.getSyscallNumber()](state);
static EXPORTED_PUBLIC SyscallManager & instance()
static KernelCoreSyscallManager m_Instance
virtual uintptr_t syscall(SyscallState &state)
uintptr_t registerSyscall(Function_t function, SyscallCallback func)
SyscallCallback m_Functions[16]
static Scheduler & instance()
virtual ~KernelCoreSyscallManager()
virtual bool registerSyscallHandler(Service_t Service, SyscallHandler *pHandler)=0
KernelCoreSyscallManager()
virtual uintptr_t syscall(Service_t service, uintptr_t function, uintptr_t p1=0, uintptr_t p2=0, uintptr_t p3=0, uintptr_t p4=0, uintptr_t p5=0)=0
uintptr_t call(Function_t function, uintptr_t p1=0, uintptr_t p2=0, uintptr_t p3=0, uintptr_t p4=0, uintptr_t p5=0)