Public members
Thread( void ) ~Thread( void ) |
Object constructor and destructor. |
Thread *getNext( void ) void setNext( Thread *t_ptr ) |
get or set the next message pointer |
Thread *getNext2( void ) void setNext2( Thread *t_ptr ) |
as above, but using the second pointer. This way a thread object
can easily be inserted in two lists at the same time. |
char getStatus( void ) void setStatus( Thread *t_ptr )
char getWaitFor( void ) void SetWaitFor( char code )
Message *getReply( void ) void setReply( Message *reply )
devreg *getVBA( void ) void setVBA( devreg *vba )
state_t *getState( void ) void setState( state_t *state )
cpu_t getCPUTime( void )
void setStartTime( void )
Thread *getParent( void ) void setParent( Thread *parent )
int getTrap( void ) void setTrap( int trap )
|
These functions return or set the correspoding thread memeber. |
void updateCPUTime( void ) |
updates the CPU time used by the thread. |
short HandleException( int type, int cause ) |
checks whether the thread has a trap manager for trap type.
If so it sends it a message with the cause value and returns
TRUE, otherwise it returns FALSE. |
short setTrapManager( int type, Thread *mgr ) |
set the thread's trap manager for trap type. Returns
FALSE if another manager has been previously specified
for the same kind of trap or if the given thread is dead; it returns
TRUE otherwise. |
MessageQueue *MsgQ; |
pointer to the queue of messages awaiting processing by the thread. |
ThreadQueue *Children; |
pointer to the queue of the thread's children. |
Thread *ExcVectors[3]; |
this array contains the trap managers for the thread. |
state_t proc_s; |
current state of the thread. |