Mark3 Realtime Kernel
colist.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 =========================================================================== */
19 #pragma once
20 
21 #include "mark3cfg.h"
22 #include "coroutine.h"
23 
24 namespace Mark3 {
25 class Coroutine;
26 
35 class CoList : public TypedCircularLinkList<Coroutine>
36 {
37 public:
38 
45  void SetPrioMap(CoPrioMap* pclPrioMap_);
46 
54  void SetPriority(PORT_PRIO_TYPE uPriority_);
55 
62  void Add(Coroutine* pclCoroutine_);
63 
70  void Remove(Coroutine* pclCoroutine_);
71 
72 private:
74  uint8_t m_uPriority;
75 };
76 } // namespace Mark3
The CoList class The CoList class implements a circular-linked-listed structure for coroutine objects...
Definition: colist.h:35
CoRoutine implementation.
CoPrioMap * m_pclPrioMap
Definition: colist.h:73
void SetPrioMap(CoPrioMap *pclPrioMap_)
SetPrioMap Assign a priority map object to this co-routine list.
Definition: colist.cpp:24
void Add(Coroutine *pclCoroutine_)
Add Add a coroutine object to this list.
Definition: colist.cpp:36
#define PORT_PRIO_TYPE
Type used for bitmap in the PriorityMap class.
Definition: portcfg.h:73
Definition: atomic.cpp:23
Mark3 Kernel Configuration This file is used to configure the kernel for your specific application in...
void SetPriority(PORT_PRIO_TYPE uPriority_)
SetPriority Set the scheduling priority of this coroutine liss; has no effect unless a SetPrioMap has...
Definition: colist.cpp:30
The Coroutine class implements a lightweight, run-to-completion task that forms the basis for co-oper...
Definition: coroutine.h:53
The PriorityMapL1 class This class implements a priority bitmap data structure. Each bit in the objec...
Definition: priomapl1.h:45
uint8_t m_uPriority
Definition: colist.h:74
void Remove(Coroutine *pclCoroutine_)
Remove Remove a given coroutine object from this list.
Definition: colist.cpp:46