Mark3 Realtime Kernel
timerscheduler.h
Go to the documentation of this file.
1 /*===========================================================================
2  _____ _____ _____ _____
3  ___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
4 | \ / | || \ || | || |/ / ||___ |
5 | \/ | || \ || \ || \ ||___ |
6 |__/\__/|__|_||__|\__\ __||__|\__\ __||__|\__\ __||______|
7  |_____| |_____| |_____| |_____|
8 
9 --[Mark3 Realtime Platform]--------------------------------------------------
10 
11 Copyright (c) 2012 - 2019 m0slevin, all rights reserved.
12 See license.txt for more information
13 =========================================================================== */
21 #pragma once
22 
23 #include "kerneltypes.h"
24 #include "mark3cfg.h"
25 
26 #include "ll.h"
27 #include "timer.h"
28 #include "timerlist.h"
29 
30 namespace Mark3
31 {
32 //---------------------------------------------------------------------------
39 {
40 public:
46  static void Init() { m_clTimerList.Init(); }
54  static void Add(Timer* pclListNode_) { m_clTimerList.Add(pclListNode_); }
62  static void Remove(Timer* pclListNode_) { m_clTimerList.Remove(pclListNode_); }
70  static void Process() { m_clTimerList.Process(); }
71 
72 private:
75 };
76 } // namespace Mark3
the TimerList class. This class implements a doubly-linked-list of timer objects. ...
Definition: timerlist.h:40
static void Remove(Timer *pclListNode_)
Remove Remove a timer from the timer scheduler. May implicitly stop the timer if this is the only act...
Timer list declarations.
void Remove(Timer *pclLinkListNode_)
Remove Remove a timer from the TimerList, cancelling its expiry.
Definition: timerlist.cpp:51
Basic data type primatives used throughout the OS.
void Init()
Init Initialize the TimerList object. Must be called before using the object.
Definition: timerlist.cpp:27
static void Process()
Process This function must be called on timer expiry (from the timer's ISR context). This will result in all timers being updated based on the epoch that just elapsed. The next timer epoch is set based on the next Timer object to expire.
static void Init()
Init Initialize the timer scheduler. Must be called before any timer, or timer-derived functions are ...
Timer object declarations.
Definition: atomic.cpp:23
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
static void Add(Timer *pclListNode_)
Add Add a timer to the timer scheduler. Adding a timer implicitly starts the timer as well...
void Process()
Process Process all timers in the timerlist as a result of the timer expiring. This will select a new...
Definition: timerlist.cpp:61
The TimerScheduler Class. This implements a "Static" class used to manage a global list of timers use...
static TimerList m_clTimerList
TimerList object manipu32ated by the Timer Scheduler.
The Timer Class. This class provides kernel-managed timers, used to provide high-precision delays...
Definition: timer.h:68
Core linked-list declarations, used by all kernel list types At the heart of RTOS data structures are...
void Add(Timer *pclListNode_)
Add Add a timer to the TimerList.
Definition: timerlist.cpp:35