|
The Pedigree Project 0.1
|
Inheritance diagram for KernelCoreSyscallManager:
Collaboration diagram for KernelCoreSyscallManager: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] |
| SyscallManager::Registration | m_Registration |
Static Private Attributes | |
| static KernelCoreSyscallManager | m_Instance |
Definition at line 29 of file KernelCoreSyscallManager.h.
| typedef uintptr_t(* KernelCoreSyscallManager::SyscallCallback) (SyscallState &) |
Definition at line 61 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 37 of file KernelCoreSyscallManager.h.
|
inlineprotected |
The constructor
Definition at line 29 of file KernelCoreSyscallManager.cc.
|
inlineprotectedvirtual |
The destructor
Definition at line 31 of file KernelCoreSyscallManager.cc.
|
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 42 of file KernelCoreSyscallManager.cc.
References SyscallManager::instance(), and SyscallManager::syscall().
| void KernelCoreSyscallManager::initialise | ( | ) |
Definition at line 33 of file KernelCoreSyscallManager.cc.
|
inlinestatic |
Get the syscall manager instance.
Definition at line 33 of file KernelCoreSyscallManager.h.
|
private |
The copy-constructor
| uintptr_t KernelCoreSyscallManager::registerSyscall | ( | Function_t | function, |
| SyscallCallback | func | ||
| ) |
Register a syscall with a callback.
Definition at line 72 of file KernelCoreSyscallManager.cc.
References m_Functions.
|
virtual |
Called when a syscall arrives.
Implements SyscallHandler.
Definition at line 52 of file KernelCoreSyscallManager.cc.
References Dec, Scheduler::instance(), m_Functions, Scheduler::yield(), and yield.
|
private |
Syscall lookup table for registerable syscalls.
Definition at line 84 of file KernelCoreSyscallManager.h.
Referenced by registerSyscall(), and syscall().
|
staticprivate |
The static singleton instance.
Definition at line 81 of file KernelCoreSyscallManager.h.
|
private |
Definition at line 85 of file KernelCoreSyscallManager.h.