104 static void Panic(uint16_t u16Cause_);
106 #if KERNEL_THREAD_CREATE_CALLOUT 117 #endif // #if KERNEL_THREAD_CREATE_HOOK 119 #if KERNEL_THREAD_EXIT_CALLOUT 131 #endif // #if KERNEL_THREAD_EXIT_CALLOUT 133 #if KERNEL_CONTEXT_SWITCH_CALLOUT 147 #endif // KERNEL_CONTEXT_SWITCH_CALLOUT 168 static void DebugPrint(
const char* szString_);
170 #if KERNEL_THREAD_CREATE_CALLOUT 179 #endif // #if KERNEL_THREAD_CREATE_HOOK 180 #if KERNEL_THREAD_EXIT_CALLOUT 189 #endif // #if KERNEL_THREAD_EXIT_HOOK 190 #if KERNEL_CONTEXT_SWITCH_CALLOUT 199 #endif // #if KERNEL_CONTEXT_SWITCH_CALLOUT 200 #if KERNEL_STACK_CHECK 203 #endif // #if KERNEL_STACK_CHECK 213 #if KERNEL_THREAD_CREATE_CALLOUT 215 #endif // #if KERNEL_THREAD_CREATE_HOOK 216 #if KERNEL_THREAD_EXIT_CALLOUT 218 #endif // #if KERNEL_THREAD_EXIT_HOOK 219 #if KERNEL_CONTEXT_SWITCH_CALLOUT 221 #endif // #if KERNEL_CONTEXT_SWITCH_CALLOUT 223 #if KERNEL_STACK_CHECK 225 #endif // #if KERNEL_STACK_CHECK Basic data type primatives used throughout the OS.
Defines the reason codes thrown when a kernel panic occurs.
void(*)(Thread *pclThread_) ThreadExitCallout
static void SetThreadContextSwitchCallout(ThreadContextCallout pfContext_)
SetThreadContextSwitchCallout Set a function to be called on each context switch. ...
void(*)(const char *szString_) DebugPrintFunction
void(*)(Thread *pclThread_) ThreadCreateCallout
static ThreadExitCallout m_pfThreadExitCallout
Function to call on thread exit.
The Kernel Class encapsulates all of the kernel startup, configuration and management functions...
static void DebugPrint(const char *szString_)
DebugPrint Print a string to the configured output interface. Has no effect if Kernel::SetDebugPrintF...
static bool IsPanic()
IsPanic Returns whether or not the kernel is in a panic state.
static ThreadCreateCallout GetThreadCreateCallout()
GetThreadCreateCallout Return the current function called on every Thread::Init();.
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
Platform independent thread class declarations Threads are an atomic unit of execution, and each instance of the thread class represents an instance of a program running of the processor. The Thread is the fundmanetal user-facing object in the kernel - it is what makes multiprocessing possible from application code.
static void SetThreadCreateCallout(ThreadCreateCallout pfCreate_)
SetThreadCreateCallout Set a function to be called on creation of a new thread. This callout is execu...
static PanicFunc m_pfPanic
set panic function
static ThreadContextCallout GetThreadContextSwitchCallout()
GetThreadContextSwitchCallout Return the current function called on every Thread::ContextSwitchSWI() ...
static uint32_t GetTicks()
static void CompleteStart()
CompleteStart Call this from the thread initialization code at the point that the scheduler is to be ...
static void Start()
Start the operating system kernel - the current execution context is cancelled, all kernel services a...
static bool m_bIsStarted
true if kernel is running, false otherwise
static void SetDebugPrintFunction(DebugPrintFunction pfPrintFunction_)
SetDebugPrintFunction Set the function to be used when printing kernel debug information.
static void SetPanic(PanicFunc pfPanic_)
SetPanic Set a function to be called when a kernel panic occurs, giving the user to determine the beh...
static bool IsStarted()
IsStarted.
static void SetThreadExitCallout(ThreadExitCallout pfExit_)
SetThreadExitCallout Set a function to be called on thread exit. This callout is executed from the be...
static ThreadCreateCallout m_pfThreadCreateCallout
Function to call on thread creation.
void(*)(Thread *pclThread_) ThreadContextCallout
static DebugPrintFunction m_pfDebugPrintFunction
Function to call to print debug info.
static uint16_t m_u16GuardThreshold
static bool m_bIsPanic
true if kernel is in panic state, false otherwise
static void SetStackGuardThreshold(uint16_t u16Threshold_)
static uint16_t GetStackGuardThreshold()
static ThreadExitCallout GetThreadExitCallout()
GetThreadExitCallout Return the current function called on every Thread::Exit();. ...
static uint32_t m_u32Ticks
void(*)(uint16_t u16PanicCode_) PanicFunc
static ThreadContextCallout m_pfThreadContextCallout
Function to call on context switch.
static void Init()
Kernel Initialization Function, call before any other OS function.
static void Panic(uint16_t u16Cause_)
Panic Cause the kernel to enter its panic state.