Dokumentation
IdleThread Class Reference
Thread that is executed when there is nothing to do for this core. More...
#include <thread/idlethread.h>
![+](closed.png)
![+](closed.png)
Public Member Functions | |
void | action () override |
Wait for a thread to become ready and sleep in the meantime. | |
![]() | |
Thread () | |
Constructor Initializes the context using prepareContext with the highest aligned address of the reserved_stack_space array as stack pointer (top of stack). More... | |
void | go () |
Activates the first thread on this CPU. More... | |
void | resume (Thread *next) |
Switches from the currently running thread to the next one. More... | |
Waitingroom * | getWaitingroom () const |
Returns the Waitingroom in which the thread is currently waiting. More... | |
void | setWaitingroom (Waitingroom *w) |
Marks the thread as waiting for an event in Waitingroom w . More... | |
Additional Inherited Members | |
![]() | |
const size_t | id |
Unique ID of thread. | |
volatile bool | kill_flag |
Marker for a dying thread. | |
![]() | |
static const size_t | STACK_SIZE = 4096 |
Stack size for each thread. | |
![]() | |
static void | kickoff (Thread *object) |
Function to start a thread. More... | |
![]() | |
StackPointer | stackpointer |
Current stack pointer of thread for context switch. | |
Detailed Description
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.
- Note
- Instance of this class should never be inserted into the scheduler's ready queue, as the IdleThread should only be executed if there is no proper work to do.
The documentation for this class was generated from the following files:
- thread/idlethread.h
- thread/idlethread.cc