Mark3 Realtime Kernel
colist.cpp
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 =========================================================================== */
20 #include "colist.h"
21 
22 namespace Mark3 {
23 //---------------------------------------------------------------------------
24 void CoList::SetPrioMap(CoPrioMap* pclPrioMap_)
25 {
26  m_pclPrioMap = pclPrioMap_;
27 }
28 
29 //---------------------------------------------------------------------------
31 {
32  m_uPriority = uPriority;
33 }
34 
35 //---------------------------------------------------------------------------
36 void CoList::Add(Coroutine* pclCoroutine_)
37 {
39  PivotForward();
40  if (m_pclPrioMap) {
42  }
43 }
44 
45 //---------------------------------------------------------------------------
46 void CoList::Remove(Coroutine* pclCoroutine_)
47 {
49  if (m_pclPrioMap) {
50  if (nullptr == GetHead()) {
52  }
53  }
54 }
55 } // namespace Mark3
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
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 Set(T uXPrio_)
Set Set the priority map bitmap data, at all levels, for the given priority.
Definition: priomapl1.h:62
void Clear(T uXPrio_)
Clear Clear the priority map bitmap data, at all levels, for the given priority.
Definition: priomapl1.h:73
CoRoutine List structure implementation.
void Remove(Coroutine *pclCoroutine_)
Remove Remove a given coroutine object from this list.
Definition: colist.cpp:46