tcb_s

include vmm.inc

tcb_s    struc
TCB_Flags            dd  ?  ; thread status flags; see below
TCB_Reserved1        dd  ?  ; reserved for use by VMM
TCB_Reserved2        dd  ?  ; reserved for use by VMM
TCB_Signature        dd  ?  ; SCHED_OBJ_THREAD_ID
TCB_ClientPtr        dd  ?  ; address of client registers
TCB_VMHandle         dd  ?  ; VM to which this thread belongs
TCB_ThreadId         dw  ?  ; thread ID 
TCB_PMLockOrigSS     dw  ?  ; client SS at Begin_Use_Locked_PM_Stack
TCB_PMLockOrigESP    dd  ?  ; client ESP at Begin_Use_Locked_PM_Stack
TCB_PMLockOrigEIP    dd  ?  ; client EIP at Begin_Use_Locked_PM_Stack
TCB_PMLockStackCount dd  ?  ; number of outstanding 
                            ;   Begin_Use_Locked_PM_Stack calls
TCB_PMLockOrigCS     dw  ?  ; client CS at Begin_Use_Locked_PM_Stack
TCB_PMPSPSelector    dw  ?  ; used by Vwin32
TCB_ThreadType       dd  ?  ; used by Vwin32
TCB_pad1             db  ?  ; padding
TCB_pad2             db  ?  ; padding
TCB_extErrLocus      db  ?  ; used by Vwin32
TCB_extErrAction     db  ?  ; used by Vwin32
TCB_extErrClass      db  ?  ; used by Vwin32
TCB_extErrPtr        dd  ?  ; used by Vwin32
tcb_s ends
 

Thread control block. Contains information about, and the status of, a thread. The handle of a thread is also the address of its corresponding tcb_s structure. All fields in this structure are read-only.

TCB_Flags
Value specifying the status of the thread. Can be zero or more of these values:
Value Meaning
THFLAG_Suspended Thread is not scheduled.
THFLAG_Not_Executeable Thread has stopped executing.
THFLAG_Thread_Creation Thread being created.
THFLAG_Thread_Blocked Thread is blocked on a semaphore.
THFLAG_Ring0_Thread Thread runs completely at ring 0.
THFLAG_ANSI THFLAG_OEM THFLAG_UNICODE THFLAG_RESERVED Used by Vwin32 to indicate file system character set.
THFLAG_Extended_Handles Thread uses extended handles.
THFLAG_Open_As_Immovable_File Used by Vwin32 to prevent defragmenter from moving an open file.

These bits are read-only. Virtual devices should not attempt to modify any of these bits. Some of the descriptions might not be directly meaningful; don't worry. Only Vwin32 really cares about them.

TCB_Reserved1, TCB_Reserved2
Reserved by VMM for internal bookkeeping.
TCB_Signature
The value SCHED_OBJ_THREAD_ID.
TCB_ClientPtr
Pointer to thread client registers.
TCB_VMHandle
Handle of VM to which this thread belongs.
TCB_ThreadId
16-bit value that uniquely identifies the thread during its lifetime. Note that thread IDs are recycled. When a thread is destroyed, its ID becomes available for use.
TCB_PMLockOrigSS, TCB_PMLockOrigESP, TCB_PMLockStackCount, and TCB_PMLockOrigCS
Used internally by the Begin_Use_Locked_PM_Stack service.
TCB_PMPSPSelector, TCB_ThreadType, TCB_extErrLocus, TCB_extErrAction, TCB_extErrClass, and TCB_extErrPtr
Used internally by Vwin32.

See Also

Close_VM, Client_Reg_Struc