next up previous contents index
Next: B.2 Pthread Definition Modul Up: B Header Dateien und Previous: B Header Dateien und

B.1 Thread Definition Modul

FOREIGN MODULE thread;

(* Mach thread Foreign Module. *)

FROM SYSTEM IMPORT ADDRESS;

FROM KSR1 IMPORT int, card; 

(* For the definitions below see /usr/include/mach.h *)

TYPE port_t              = ADDRESS;
TYPE processor_name_t    = port_t;
TYPE thread_t            = port_t;

TYPE ksr_thread_state  = RECORD 
        ceu_regs       : ARRAY [0..31] OF LONGINT; 
        ipu_regs       : ARRAY [0..31] OF LONGINT; 
        fpu_regs       : ARRAY [0..63] OF LONGINT; 
        xui_timers     : ARRAY [0..1] OF LONGINT; 
        ceu_context    : LONGINT; 
        ipu_context    : LONGINT; 
        fpu_context    : LONGINT; 
        ceu_trap       : LONGINT; 
        ipu_trap       : LONGINT; 
        fpu_trap       : LONGINT; 
        xiu_trap       : LONGINT; 
        reserved       : ARRAY [0..63] OF LONGINT; (*for safety*) 
                         END;
TYPE thread_state_t    = (*POINTER TO*) ksr_thread_state;  

CONST KSR_THREAD_STATE = 1;

(* Mach thread status functions. *)

PROCEDURE thread_get_state(thread: thread_t; 
                           flavor: int;
                           old_state: thread_state_t; 
                           VAR old_stateCnt: card): LONGINT;
(*Get thread state. *)

END thread.



parallel@rz.uni-mannheim.de
Mon Okt 28 14:38:25 PST 1996