The Pedigree Project  0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
KernelCoreSyscallManager Class Reference
+ 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 KernelCoreSyscallManagerinstance ()
 

Protected Member Functions

 KernelCoreSyscallManager ()
 
virtual ~KernelCoreSyscallManager ()
 
- Protected Member Functions inherited from SyscallHandler
virtual ~SyscallHandler ()
 

Private Member Functions

 KernelCoreSyscallManager (const KernelCoreSyscallManager &)
 
KernelCoreSyscallManageroperator= (const KernelCoreSyscallManager &)
 

Private Attributes

SyscallCallback m_Functions [16]
 

Static Private Attributes

static KernelCoreSyscallManager m_Instance
 

Detailed Description

Definition at line 28 of file KernelCoreSyscallManager.h.

Member Enumeration Documentation

Enumerator
yield 

Yields the processor to another thread.

link 

Dynamic linking request.

Note
If you change this, update system/modules/linker/asm-*.s !
functionEnd 

The last function, for error checking.

Definition at line 38 of file KernelCoreSyscallManager.h.

Constructor & Destructor Documentation

KernelCoreSyscallManager::KernelCoreSyscallManager ( )
inlineprotected

The constructor

Definition at line 29 of file KernelCoreSyscallManager.cc.

KernelCoreSyscallManager::~KernelCoreSyscallManager ( )
inlineprotectedvirtual
KernelCoreSyscallManager::KernelCoreSyscallManager ( const KernelCoreSyscallManager )
private

The copy-constructor

Note
Not implemented (singleton)

Member Function Documentation

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().

static KernelCoreSyscallManager& KernelCoreSyscallManager::instance ( )
inlinestatic

Get the syscall manager instance.

Returns
instance of the syscall manager

Definition at line 33 of file KernelCoreSyscallManager.h.

Referenced by DLTrapHandler::trap().

+ Here is the caller graph for this function:

KernelCoreSyscallManager& KernelCoreSyscallManager::operator= ( const KernelCoreSyscallManager )
private

The copy-constructor

Note
Not implemented (singleton)
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().

+ Here is the caller graph for this function:

uintptr_t KernelCoreSyscallManager::syscall ( SyscallState &  state)
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().

Member Data Documentation

SyscallCallback KernelCoreSyscallManager::m_Functions[16]
private

Syscall lookup table for registerable syscalls.

Definition at line 87 of file KernelCoreSyscallManager.h.

Referenced by registerSyscall(), syscall(), and ~KernelCoreSyscallManager().

KernelCoreSyscallManager KernelCoreSyscallManager::m_Instance
staticprivate

The static singleton instance.

Definition at line 84 of file KernelCoreSyscallManager.h.


The documentation for this class was generated from the following files: