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.
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.
Close_VM, Client_Reg_Struc