OOStuBS - Technische Informatik II (TI-II)  2.4
Öffentliche Methoden | Private Typen | Private Attribute | Aufstellung aller Elemente
Context Klassenreferenz

Storage for current context of thread. Mehr ...

#include <context.h>

Öffentliche Methoden

 Context (Thread *thread)
 Context creation.
void set ()
 replaces the currently running context with this one
void swap (Context &next)
 swaps the currently running context with the specified one

Private Typen

typedef void * Register
 Definition of a storage type able to hold CPU register contents.
enum  RegisterIndices {
  ebx = 0, esi = 1, edi = 2, esp = 3,
  ebp = 4
}
 Index enumeration mapping registers to indices of the registers array. Mehr ...

Private Attribute

Register registers [5]
 the non-volatile x86 base registers
Register stack [1024]
 Local 1K stack of this thread.

Ausführliche Beschreibung

Storage for current context of thread.

This class contains all information needed to represent a thread of execution. It may be used to stop, switch and continue currently running threads.

Definiert in Zeile 24 der Datei context.h.

Dokumentation der benutzerdefinierten Datentypen

typedef void* Context::Register
private

Definition of a storage type able to hold CPU register contents.

Definiert in Zeile 27 der Datei context.h.

Dokumentation der Aufzählungstypen

Index enumeration mapping registers to indices of the registers array.

Aufzählungswerte:
ebx 

General purpose register

esi 

General purpose register

edi 

General purpose register

esp 

Stack pointer

ebp 

Base pointer

Definiert in Zeile 30 der Datei context.h.

Beschreibung der Konstruktoren und Destruktoren

Context::Context ( Thread thread)

Context creation.

On construction of the context the CPU registers will be filled with appropriate information, to start the thread on its first scheduling

Parameter
threadpointer to thread object

Definiert in Zeile 4 der Datei context.cc.

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Dokumentation der Elementfunktionen

void Context::set ( )

replaces the currently running context with this one

This method does not preserve the old context. Therefore the current execution state of the originating thread is lost.

Definiert in Zeile 11 der Datei context.cc.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

void Context::swap ( Context next)

swaps the currently running context with the specified one

During the swap process the registers of the currently active context will be updated with the actualk values contained in the CPU.

Parameter
nextthe next context to be run by the CPU

Definiert in Zeile 22 der Datei context.cc.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Dokumentation der Datenelemente

Register Context::registers[5]
private

the non-volatile x86 base registers

Definiert in Zeile 39 der Datei context.h.

Register Context::stack[1024]
private

Local 1K stack of this thread.

Definiert in Zeile 42 der Datei context.h.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: