The Pedigree Project
0.1
|
Public Types | |
enum | Function_t { yield = 0, link = 1, sleep = 2, functionEnd } |
typedef uintptr_t(* | SyscallCallback) (SyscallState &) |
Public Member Functions | |
void | initialise () |
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) |
virtual uintptr_t | syscall (SyscallState &state) |
uintptr_t | registerSyscall (Function_t function, SyscallCallback func) |
Static Public Member Functions | |
static KernelCoreSyscallManager & | instance () |
Protected Member Functions | |
KernelCoreSyscallManager () | |
virtual | ~KernelCoreSyscallManager () |
Protected Member Functions inherited from SyscallHandler | |
virtual | ~SyscallHandler () |
Private Member Functions | |
KernelCoreSyscallManager (const KernelCoreSyscallManager &) | |
KernelCoreSyscallManager & | operator= (const KernelCoreSyscallManager &) |
Private Attributes | |
SyscallCallback | m_Functions [16] |
Static Private Attributes | |
static KernelCoreSyscallManager | m_Instance |
Definition at line 28 of file KernelCoreSyscallManager.h.
Enumerator | |
---|---|
yield |
Yields the processor to another thread. |
link |
Dynamic linking request.
|
functionEnd |
The last function, for error checking. |
Definition at line 38 of file KernelCoreSyscallManager.h.
|
inlineprotected |
The constructor
Definition at line 29 of file KernelCoreSyscallManager.cc.
|
inlineprotectedvirtual |
The destructor
Definition at line 33 of file KernelCoreSyscallManager.cc.
References SyscallManager::instance(), m_Functions, and SyscallManager::registerSyscallHandler().
|
private |
The copy-constructor
uintptr_t KernelCoreSyscallManager::call | ( | Function_t | function, |
uintptr_t | p1 = 0 , |
||
uintptr_t | p2 = 0 , |
||
uintptr_t | p3 = 0 , |
||
uintptr_t | p4 = 0 , |
||
uintptr_t | p5 = 0 |
||
) |
Calls a syscall.
Definition at line 46 of file KernelCoreSyscallManager.cc.
References SyscallManager::instance(), and SyscallManager::syscall().
|
inlinestatic |
Get the syscall manager instance.
Definition at line 33 of file KernelCoreSyscallManager.h.
Referenced by DLTrapHandler::trap().
|
private |
The copy-constructor
uintptr_t KernelCoreSyscallManager::registerSyscall | ( | Function_t | function, |
SyscallCallback | func | ||
) |
Register a syscall with a callback.
Definition at line 87 of file KernelCoreSyscallManager.cc.
References m_Functions.
Referenced by DLTrapHandler::trap().
|
virtual |
Called when a syscall arrives.
Implements SyscallHandler.
Definition at line 59 of file KernelCoreSyscallManager.cc.
References Dec, ERROR, Scheduler::instance(), m_Functions, NOTICE, yield, and Scheduler::yield().
|
private |
Syscall lookup table for registerable syscalls.
Definition at line 87 of file KernelCoreSyscallManager.h.
Referenced by registerSyscall(), syscall(), and ~KernelCoreSyscallManager().
|
staticprivate |
The static singleton instance.
Definition at line 84 of file KernelCoreSyscallManager.h.