Mark3 Realtime Kernel
Mark3::ThreadList Class Reference

The ThreadList Class. This class is used for building thread-management facilities, such as schedulers, and blocking objects. More...

#include <threadlist.h>

Inheritance diagram for Mark3::ThreadList:
Mark3::TypedLinkListNode< ThreadList > Mark3::TypedCircularLinkList< Thread > Mark3::LinkListNode Mark3::CircularLinkList Mark3::LinkList

Public Member Functions

void * operator new (size_t sz, void *pv)
 
 ThreadList ()
 ThreadList Default constructor - zero-initializes the data. More...
 
void SetPriority (PORT_PRIO_TYPE uXPriority_)
 SetPriority Set the priority of this threadlist (if used for a scheduler). More...
 
void SetMapPointer (PriorityMap *pclMap_)
 SetMapPointer Set the pointer to a bitmap to use for this threadlist. Once again, only needed when the threadlist is being used for scheduling purposes. More...
 
void Add (Thread *node_)
 Add Add a thread to the threadlist. More...
 
void Add (Thread *node_, PriorityMap *pclMap_, PORT_PRIO_TYPE uXPriority_)
 Add Add a thread to the threadlist, specifying the flag and priority at the same time. More...
 
void AddPriority (Thread *node_)
 AddPriority Add a thread to the list such that threads are ordered from highest to lowest priority from the head of the list. More...
 
void Remove (Thread *node_)
 Remove Remove the specified thread from the threadlist. More...
 
ThreadHighestWaiter ()
 HighestWaiter Return a pointer to the highest-priority thread in the thread-list. More...
 

Private Attributes

PORT_PRIO_TYPE m_uXPriority
 Priority of the threadlist. More...
 
PriorityMapm_pclMap
 Pointer to the bitmap/flag to set when used for scheduling. More...
 

Additional Inherited Members

Detailed Description

The ThreadList Class. This class is used for building thread-management facilities, such as schedulers, and blocking objects.

Definition at line 38 of file threadlist.h.

Constructor & Destructor Documentation

◆ ThreadList()

Mark3::ThreadList::ThreadList ( )

ThreadList Default constructor - zero-initializes the data.

Definition at line 27 of file threadlist.cpp.

Member Function Documentation

◆ Add() [1/2]

void Mark3::ThreadList::Add ( Thread node_)

Add Add a thread to the threadlist.

Parameters
node_Pointer to the thread (link list node) to add to the list

Definition at line 47 of file threadlist.cpp.

◆ Add() [2/2]

void Mark3::ThreadList::Add ( Thread node_,
PriorityMap pclMap_,
PORT_PRIO_TYPE  uXPriority_ 
)

Add Add a thread to the threadlist, specifying the flag and priority at the same time.

Parameters
node_Pointer to the thread to add (link list node)
pclMap_Pointer to the bitmap flag to set (if used in a scheduler context), or nullptr for non-scheduler.
uXPriority_Priority of the threadlist

Definition at line 101 of file threadlist.cpp.

◆ AddPriority()

void Mark3::ThreadList::AddPriority ( Thread node_)

AddPriority Add a thread to the list such that threads are ordered from highest to lowest priority from the head of the list.

Parameters
node_Pointer to a thread to add to the list.

Definition at line 66 of file threadlist.cpp.

◆ HighestWaiter()

Thread * Mark3::ThreadList::HighestWaiter ( )

HighestWaiter Return a pointer to the highest-priority thread in the thread-list.

Returns
Pointer to the highest-priority thread

Definition at line 128 of file threadlist.cpp.

◆ operator new()

void* Mark3::ThreadList::operator new ( size_t  sz,
void *  pv 
)
inline

Definition at line 41 of file threadlist.h.

◆ Remove()

void Mark3::ThreadList::Remove ( Thread node_)

Remove Remove the specified thread from the threadlist.

Parameters
node_Pointer to the thread to remove

Definition at line 111 of file threadlist.cpp.

◆ SetMapPointer()

void Mark3::ThreadList::SetMapPointer ( PriorityMap pclMap_)

SetMapPointer Set the pointer to a bitmap to use for this threadlist. Once again, only needed when the threadlist is being used for scheduling purposes.

Parameters
pclMap_Pointer to the priority map object used to track this thread.

Definition at line 40 of file threadlist.cpp.

◆ SetPriority()

void Mark3::ThreadList::SetPriority ( PORT_PRIO_TYPE  uXPriority_)

SetPriority Set the priority of this threadlist (if used for a scheduler).

Parameters
uXPriority_Priority level of the thread list

Definition at line 34 of file threadlist.cpp.

Member Data Documentation

◆ m_pclMap

PriorityMap* Mark3::ThreadList::m_pclMap
private

Pointer to the bitmap/flag to set when used for scheduling.

Definition at line 116 of file threadlist.h.

◆ m_uXPriority

PORT_PRIO_TYPE Mark3::ThreadList::m_uXPriority
private

Priority of the threadlist.

Definition at line 113 of file threadlist.h.


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