OOStuBS - Technische Informatik II (TI-II)
2.4
|
#include <scheduler.h>
Klassen | |
class | Idle |
Öffentliche Methoden | |
Thread * | active () const |
void | exit () |
Remove the currently active thread from the queue. | |
void | insert (Thread &that) |
Insert the specified thread into the queue. | |
Scheduler () | |
Default Constructor clearing started flag. | |
void | start () |
Start the scheduling by starting the first thread. | |
void | yield () |
Yield to another ready thread. | |
~Scheduler () | |
Default Denstructor clearing started flag. |
Geschützte Methoden | |
bool | kill (Thread &that) |
Remove the specified thread from the queue of threads, killing the execution of this thread. | |
void | next () |
helper function stop the execution of the current thread and switch to next one | |
void | reactivate (Thread &unblocked) |
![]() | |
void | dispatch (Thread &next) |
Switch to another thread. | |
Dispatcher () | |
void | start (Thread &first) |
Starts the scheduling. |
Private Methoden | |
void | preempt () |
helper function to yield unguarded to another thread |
Private Attribute | |
Scheduler::Idle | idle |
bool | started |
flag set upon start of scheduler | |
Queue | threads |
Queue of threads that are ready to be processed. |
Freundbeziehungen | |
void | Watch::trigger () |
Definiert in Zeile 28 der Datei scheduler.h.
Scheduler::Scheduler | ( | ) |
Default Constructor clearing started flag.
Definiert in Zeile 25 der Datei scheduler.cc.
Scheduler::~Scheduler | ( | ) |
Default Denstructor clearing started flag.
Definiert in Zeile 27 der Datei scheduler.cc.
Thread * Scheduler::active | ( | ) | const |
Erneute Implementation von Dispatcher.
Erneute Implementation in Organizer.
Definiert in Zeile 90 der Datei scheduler.cc.
void Scheduler::exit | ( | ) |
Remove the currently active thread from the queue.
of thread and resumes with the next thread. If there are no more threads the scheduler starts an idle loop.
Definiert in Zeile 59 der Datei scheduler.cc.
void Scheduler::insert | ( | Thread & | that | ) |
Insert the specified thread into the queue.
of threads that are ready to be processed.
that | reference to the thread to be inserted |
Definiert in Zeile 44 der Datei scheduler.cc.
|
protected |
Remove the specified thread from the queue of threads, killing the execution of this thread.
that | reference of the thread to be killed. |
Definiert in Zeile 65 der Datei scheduler.cc.
|
protected |
helper function stop the execution of the current thread and switch to next one
This helper function unifies the scheduling of the next thread
Definiert in Zeile 50 der Datei scheduler.cc.
|
private |
helper function to yield unguarded to another thread
This helper function is used by watch to preempt the currently running thread.
Definiert in Zeile 78 der Datei scheduler.cc.
|
protected |
Definiert in Zeile 86 der Datei scheduler.cc.
void Scheduler::start | ( | ) |
Start the scheduling by starting the first thread.
Definiert in Zeile 31 der Datei scheduler.cc.
void Scheduler::yield | ( | ) |
Yield to another ready thread.
Definiert in Zeile 73 der Datei scheduler.cc.
|
friend |
|
private |
|
private |
flag set upon start of scheduler
Definiert in Zeile 34 der Datei scheduler.h.
|
private |
Queue of threads that are ready to be processed.
Definiert in Zeile 31 der Datei scheduler.h.