Mark3 Realtime Kernel
|
The Kernel Class encapsulates all of the kernel startup, configuration and management functions. More...
#include <kernel.h>
Static Public Member Functions | |
static void | Init () |
Kernel Initialization Function, call before any other OS function. More... | |
static void | Start () |
Start the operating system kernel - the current execution context is cancelled, all kernel services are started, and the processor resumes execution at the entrypoint for the highest-priority thread. More... | |
static void | CompleteStart () |
CompleteStart Call this from the thread initialization code at the point that the scheduler is to be run for the first time. More... | |
static bool | IsStarted () |
IsStarted. More... | |
static void | SetPanic (PanicFunc pfPanic_) |
SetPanic Set a function to be called when a kernel panic occurs, giving the user to determine the behavior when a catastrophic failure is observed. More... | |
static bool | IsPanic () |
IsPanic Returns whether or not the kernel is in a panic state. More... | |
static void | Panic (uint16_t u16Cause_) |
Panic Cause the kernel to enter its panic state. More... | |
static void | SetThreadCreateCallout (ThreadCreateCallout pfCreate_) |
SetThreadCreateCallout Set a function to be called on creation of a new thread. This callout is executed on the successful completion of a Thread::Init() call. A callout is only executed if this method has been called to set a valid handler function. More... | |
static void | SetThreadExitCallout (ThreadExitCallout pfExit_) |
SetThreadExitCallout Set a function to be called on thread exit. This callout is executed from the beginning of Thread::Exit(). More... | |
static void | SetThreadContextSwitchCallout (ThreadContextCallout pfContext_) |
SetThreadContextSwitchCallout Set a function to be called on each context switch. More... | |
static void | SetDebugPrintFunction (DebugPrintFunction pfPrintFunction_) |
SetDebugPrintFunction Set the function to be used when printing kernel debug information. More... | |
static void | DebugPrint (const char *szString_) |
DebugPrint Print a string to the configured output interface. Has no effect if Kernel::SetDebugPrintFunction() has not been called with a valid print handler. More... | |
static ThreadCreateCallout | GetThreadCreateCallout () |
GetThreadCreateCallout Return the current function called on every Thread::Init();. More... | |
static ThreadExitCallout | GetThreadExitCallout () |
GetThreadExitCallout Return the current function called on every Thread::Exit();. More... | |
static ThreadContextCallout | GetThreadContextSwitchCallout () |
GetThreadContextSwitchCallout Return the current function called on every Thread::ContextSwitchSWI() More... | |
static void | SetStackGuardThreshold (uint16_t u16Threshold_) |
static uint16_t | GetStackGuardThreshold () |
static void | Tick () |
static uint32_t | GetTicks () |
Static Private Attributes | |
static bool | m_bIsStarted |
true if kernel is running, false otherwise More... | |
static bool | m_bIsPanic |
true if kernel is in panic state, false otherwise More... | |
static PanicFunc | m_pfPanic |
set panic function More... | |
static ThreadCreateCallout | m_pfThreadCreateCallout |
Function to call on thread creation. More... | |
static ThreadExitCallout | m_pfThreadExitCallout |
Function to call on thread exit. More... | |
static ThreadContextCallout | m_pfThreadContextCallout |
Function to call on context switch. More... | |
static DebugPrintFunction | m_pfDebugPrintFunction |
Function to call to print debug info. More... | |
static uint16_t | m_u16GuardThreshold |
static uint32_t | m_u32Ticks |
The Kernel Class encapsulates all of the kernel startup, configuration and management functions.
|
static |
CompleteStart Call this from the thread initialization code at the point that the scheduler is to be run for the first time.
Definition at line 64 of file kernel.cpp.
|
static |
DebugPrint Print a string to the configured output interface. Has no effect if Kernel::SetDebugPrintFunction() has not been called with a valid print handler.
szString_ | string to print |
Definition at line 81 of file kernel.cpp.
|
inlinestatic |
|
inlinestatic |
GetThreadContextSwitchCallout Return the current function called on every Thread::ContextSwitchSWI()
|
inlinestatic |
GetThreadCreateCallout Return the current function called on every Thread::Init();.
|
inlinestatic |
GetThreadExitCallout Return the current function called on every Thread::Exit();.
|
static |
Definition at line 90 of file kernel.cpp.
|
static |
Kernel Initialization Function, call before any other OS function.
Initializes all global resources used by the operating system. This must be called before any other kernel function is invoked.
Definition at line 44 of file kernel.cpp.
|
inlinestatic |
|
inlinestatic |
|
static |
Panic Cause the kernel to enter its panic state.
u16Cause_ | Reason for the kernel panic |
Definition at line 70 of file kernel.cpp.
|
inlinestatic |
SetDebugPrintFunction Set the function to be used when printing kernel debug information.
pfPrintFunction_ | Function used to print kernel debug message strings |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
SetThreadContextSwitchCallout Set a function to be called on each context switch.
A callout is only executed if this method has been called to set a valid handler function.
pfContext_ | Pointer to a function to call on context switch |
|
inlinestatic |
SetThreadCreateCallout Set a function to be called on creation of a new thread. This callout is executed on the successful completion of a Thread::Init() call. A callout is only executed if this method has been called to set a valid handler function.
pfCreate_ | Pointer to a function to call on thread creation |
|
inlinestatic |
SetThreadExitCallout Set a function to be called on thread exit. This callout is executed from the beginning of Thread::Exit().
A callout is only executed if this method has been called to set a valid handler function.
pfExit_ | Pointer to a function to call on thread exit |
|
static |
Start the operating system kernel - the current execution context is cancelled, all kernel services are started, and the processor resumes execution at the entrypoint for the highest-priority thread.
You must have at least one thread added to the kernel before calling this function, otherwise the behavior is undefined. The exception to this is if the system is configured to use the threadless idle hook, in which case the kernel is allowed to run without any ready threads.
Definition at line 58 of file kernel.cpp.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |