StuBS
|
Thread that is executed when there is nothing to do for this core. More...
#include <idlethread.h>
Public Member Functions | |
void | action () override |
Wait for a thread to become ready and sleep in the meantime. | |
Public Member Functions inherited from Thread | |
Thread (void *tos) | |
Constructor Initializes the context using prepareContext with the given stack space. | |
void | go () |
Activates the first thread on this CPU. | |
void | resume (Thread *next) |
Switches from the currently running thread to the next one. | |
virtual void | action ()=0 |
Method that contains the thread's program code. | |
Waitingroom * | getWaitingroom () const |
Returns the Waitingroom in which the thread is currently waiting. | |
void | setWaitingroom (Waitingroom *w) |
Marks the thread as waiting for an event in Waitingroom w . | |
Additional Inherited Members | |
Public Attributes inherited from Thread | |
volatile bool | kill_flag |
Marker for a dying thread. | |
Static Protected Member Functions inherited from Thread | |
static void | kickoff (Thread *object) |
Function to start a thread. | |
Protected Attributes inherited from Thread | |
Context | context |
Context of the thread, used for saving and restoring the register values when context switching. | |
Thread that is executed when there is nothing to do for this core.
Using the IdleThread simplifies the idea of waiting and is an answer to the questions that arise once the ready queue is empty.