The Pedigree Project
0.1
|
#include <SyscallManager.h>
Public Member Functions | |
virtual bool | registerSyscallHandler (Service_t Service, SyscallHandler *pHandler) |
uintptr_t | syscall (Service_t service, uintptr_t function, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5) |
Static Public Member Functions | |
static X64SyscallManager & | instance () |
static void | initialiseProcessor () INITIALISATION_ONLY |
Static Public Member Functions inherited from SyscallManager | |
static EXPORTED_PUBLIC SyscallManager & | instance () |
Private Member Functions | |
X64SyscallManager () INITIALISATION_ONLY | |
X64SyscallManager (const X64SyscallManager &) | |
X64SyscallManager & | operator= (const X64SyscallManager &) |
virtual | ~X64SyscallManager () |
Static Private Member Functions | |
static void | syscall (SyscallState &syscallState) USED |
Private Attributes | |
Spinlock | m_Lock |
SyscallHandler * | m_pHandler [serviceEnd] |
Static Private Attributes | |
static X64SyscallManager | m_Instance |
Friends | |
class | Processor |
Additional Inherited Members | |
Protected Member Functions inherited from SyscallManager | |
SyscallManager () | |
virtual | ~SyscallManager () |
The syscall manager on x64 processors
Definition at line 36 of file kernel/core/processor/x64/SyscallManager.h.
|
private |
The constructor
Definition at line 181 of file x64/SyscallManager.cc.
References m_pHandler.
Referenced by instance().
|
private |
Copy constructor
|
privatevirtual |
The destructor
Definition at line 187 of file x64/SyscallManager.cc.
Referenced by instance().
|
static |
Initialises this processors syscall handling
Definition at line 162 of file x64/SyscallManager.cc.
References Processor::readMachineSpecificRegister(), and Processor::writeMachineSpecificRegister().
Referenced by instance().
|
inlinestatic |
Get the X64SyscallManager class instance
Definition at line 43 of file kernel/core/processor/x64/SyscallManager.h.
References INITIALISATION_ONLY, initialiseProcessor(), m_Instance, operator=(), registerSyscallHandler(), syscall(), USED, X64SyscallManager(), and ~X64SyscallManager().
|
private |
Assignment operator
Referenced by instance().
|
virtual |
Register a syscall handler
[in] | Service | the service number you want to register |
[in] | pHandler | the interrupt handler |
Implements SyscallManager.
Definition at line 42 of file x64/SyscallManager.cc.
References UNLIKELY.
Referenced by instance().
|
virtual |
Called to execute a syscall.
Implements SyscallManager.
Definition at line 143 of file x64/SyscallManager.cc.
Referenced by instance().
|
staticprivate |
Called when a syscall was called
[in] | syscallState | reference to the usermode state before the syscall |
Definition at line 59 of file x64/SyscallManager.cc.
References Dec, Thread::Exit, Process::getId(), Hex, Processor::information(), LIKELY, NOTICE, Processor::setInterrupts(), Time::Stopwatch::stop(), SyscallHandler::syscall(), UNLIKELY, and Time::Stopwatch::value().
|
staticprivate |
The instance of the syscall manager
Definition at line 85 of file kernel/core/processor/x64/SyscallManager.h.
Referenced by instance().
|
private |
Spinlock protecting the member variables
Definition at line 79 of file kernel/core/processor/x64/SyscallManager.h.
|
private |
The syscall handlers
Definition at line 82 of file kernel/core/processor/x64/SyscallManager.h.
Referenced by X64SyscallManager().