Fix build by initializing thread dispatcher header

This commit is contained in:
2026-06-10 11:56:49 +02:00
parent f3ae70573c
commit 51ec7e3bab
3 changed files with 5 additions and 4 deletions

View File

@@ -645,7 +645,7 @@ typedef struct _KTHREAD
LIST_ENTRY ThreadListEntry; LIST_ENTRY ThreadListEntry;
UCHAR LargeStack; UCHAR LargeStack;
UCHAR PowerState; UCHAR PowerState;
UCHAR NpxIrql; UCHAR NpxRunLevel;
UCHAR Spare5; UCHAR Spare5;
BOOLEAN AutoAlignment; BOOLEAN AutoAlignment;
UCHAR Iopl; UCHAR Iopl;

View File

@@ -66,7 +66,7 @@ KE::KThread::InitializeThreadContext(IN PKTHREAD Thread,
/* Disable coprocessor floating point state */ /* Disable coprocessor floating point state */
Thread->NpxState = NPX_STATE_UNLOADED; Thread->NpxState = NPX_STATE_UNLOADED;
Thread->Header.NpxIrql = PASSIVE_LEVEL; Thread->NpxRunLevel = PASSIVE_LEVEL;
/* Set initial floating point state */ /* Set initial floating point state */
FxSaveFormat = (PFX_SAVE_FORMAT)ContextRecord->ExtendedRegisters; FxSaveFormat = (PFX_SAVE_FORMAT)ContextRecord->ExtendedRegisters;

View File

@@ -144,8 +144,9 @@ KE::KThread::InitializeThread(IN PKPROCESS Process,
Allocation = FALSE; Allocation = FALSE;
/* Initialize thread dispatcher header */ /* Initialize thread dispatcher header */
Thread->Header.Type = ThreadObject;
Thread->Header.SignalState = 0; Thread->Header.SignalState = 0;
Thread->Header.Size = sizeof(KTHREAD) / sizeof(LONG);
Thread->Header.Type = ThreadObject;
/* Initialize thread wait list */ /* Initialize thread wait list */
RTL::LinkedList::InitializeListHead(&Thread->Header.WaitListHead); RTL::LinkedList::InitializeListHead(&Thread->Header.WaitListHead);
@@ -269,7 +270,7 @@ KE::KThread::InitializeThread(IN PKPROCESS Process,
*/ */
XTAPI XTAPI
VOID VOID
KE::KThread::StartThread(IN PKTHREAD Thread) KE::KThread::StartThread(IN OUT PKTHREAD Thread)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }