Mark3 Realtime Kernel
Mark3::Quantum Class Reference

The Quantum Class. Static-class used to implement Thread quantum functionality, which is fundamental to round-robin thread scheduling. More...

#include <quantum.h>

Static Public Member Functions

static void Init ()
 
static void SetInTimer ()
 SetInTimer Set a flag to indicate that the CPU is currently running within the timer-callback routine. This prevents the Quantum timer from being updated in the middle of a callback cycle, potentially resulting in the kernel timer becoming disabled. More...
 
static void ClearInTimer ()
 ClearInTimer Clear the flag once the timer callback function has been completed. More...
 
static void Update (Thread *pclTargetThread_)
 Update Update the current thread being tracked for round-robing scheduling. Note - this has no effect if called from the Timer thread, or if the Timer thread is active. More...
 
static void SetTimerThread (Thread *pclTimerThread_)
 SetTimerThread Pass the timer thread's Thread pointer to the Quantum module to track against requests to update the round-robin timer. More...
 
static void Cancel ()
 

Static Private Attributes

static Threadm_pclActiveThread
 
static Threadm_pclTimerThread
 
static uint16_t m_u16TicksRemain
 
static bool m_bInTimer
 

Detailed Description

The Quantum Class. Static-class used to implement Thread quantum functionality, which is fundamental to round-robin thread scheduling.

Definition at line 42 of file quantum.h.

Member Function Documentation

◆ Cancel()

static void Mark3::Quantum::Cancel ( )
static

Cancel the round-robin timer.

◆ ClearInTimer()

static void Mark3::Quantum::ClearInTimer ( )
static

ClearInTimer Clear the flag once the timer callback function has been completed.

◆ Init()

static void Mark3::Quantum::Init ( )
static

◆ SetInTimer()

static void Mark3::Quantum::SetInTimer ( )
static

SetInTimer Set a flag to indicate that the CPU is currently running within the timer-callback routine. This prevents the Quantum timer from being updated in the middle of a callback cycle, potentially resulting in the kernel timer becoming disabled.

◆ SetTimerThread()

static void Mark3::Quantum::SetTimerThread ( Thread pclTimerThread_)
inlinestatic

SetTimerThread Pass the timer thread's Thread pointer to the Quantum module to track against requests to update the round-robin timer.

Parameters
pclTimerThread_Pointer to the Timer thread's Thread object.

Definition at line 79 of file quantum.h.

◆ Update()

static void Mark3::Quantum::Update ( Thread pclTargetThread_)
static

Update Update the current thread being tracked for round-robing scheduling. Note - this has no effect if called from the Timer thread, or if the Timer thread is active.

Parameters
pclTargetThread_New thread to track.

Member Data Documentation

◆ m_bInTimer

bool Mark3::Quantum::m_bInTimer
staticprivate

Definition at line 90 of file quantum.h.

◆ m_pclActiveThread

Thread* Mark3::Quantum::m_pclActiveThread
staticprivate

Definition at line 87 of file quantum.h.

◆ m_pclTimerThread

Thread* Mark3::Quantum::m_pclTimerThread
staticprivate

Definition at line 88 of file quantum.h.

◆ m_u16TicksRemain

uint16_t Mark3::Quantum::m_u16TicksRemain
staticprivate

Definition at line 89 of file quantum.h.


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