OOStuBS - Technische Informatik II (TI-II)
2.4
|
Managing currently active threads. Mehr ...
#include <dispatch.h>
Öffentliche Methoden | |
Thread * | active () const |
Returns the currently active thread. | |
void | dispatch (Thread &next) |
Switch to another thread. | |
Dispatcher () | |
void | start (Thread &first) |
Starts the scheduling. |
Private Attribute | |
Thread * | current |
Managing currently active threads.
The dispatcher changes the currently active thread if the system. It keeps track of all effectively running therads and management the transition of one thread to another. In the current setup only single CPU systems are supported.
Definiert in Zeile 30 der Datei dispatch.h.
|
inline |
Definiert in Zeile 44 der Datei dispatch.h.
|
inline |
Returns the currently active thread.
Erneute Implementation in Scheduler und Organizer.
Definiert in Zeile 70 der Datei dispatch.h.
void Dispatcher::dispatch | ( | Thread & | next | ) |
Switch to another thread.
The new thread is specified as the parameter of the call. During the transition the old thread context is saved and the new thread context is installed on the CPU.
next | Reference to the new active thread. |
Definiert in Zeile 24 der Datei dispatch.cc.
void Dispatcher::start | ( | Thread & | first | ) |
Starts the scheduling.
The scheduling is started through a transition to the first thread available in the system. This transition is one way. The original context is not saved and can therefore never be restored.
first | Reference of the first thread scheduled in the system. |
Definiert in Zeile 19 der Datei dispatch.cc.
|
private |
Definiert in Zeile 36 der Datei dispatch.h.