NodePrcb = KiProcessorBlock[Process->ThreadSeed];
/* Calculate affinity mask */
+#ifdef _M_ARM
+ DbgBreakPoint();
+ Set = 0;
+#else
Set = ~NodePrcb->MultiThreadProcessorSet;
+#endif
Mask = (ULONG)(Node->ProcessorMask & Process->Affinity);
Set &= Mask;
if (Set) Mask = Set;
PKTIMER Timer;
NTSTATUS Status;
- /* Initalize the Dispatcher Header */
+ /* Initialize the Dispatcher Header */
Thread->Header.Type = ThreadObject;
Thread->Header.ThreadControlFlags = 0;
Thread->Header.DebugActive = FALSE;
Thread->ServiceTable = KeServiceDescriptorTable;
/* Setup APC Fields */
- InitializeListHead(&Thread->ApcState.ApcListHead[0]);
- InitializeListHead(&Thread->ApcState.ApcListHead[1]);
+ InitializeListHead(&Thread->ApcState.ApcListHead[KernelMode]);
+ InitializeListHead(&Thread->ApcState.ApcListHead[UserMode]);
Thread->ApcState.Process = Process;
Thread->ApcStatePointer[OriginalApcEnvironment] = &Thread->ApcState;
Thread->ApcStatePointer[AttachedApcEnvironment] = &Thread->SavedApcState;
TimerWaitBlock->WaitListEntry.Flink = &Timer->Header.WaitListHead;
TimerWaitBlock->WaitListEntry.Blink = &Timer->Header.WaitListHead;
- /* Set the TEB */
+ /* Set the TEB and process */
Thread->Teb = Teb;
+ Thread->Process = Process;
/* Check if we have a kernel stack */
if (!KernelStack)
Status = STATUS_SUCCESS;
_SEH2_TRY
{
- /* Initalize the Thread Context */
+ /* Initialize the Thread Context */
KiInitializeContextThread(Thread,
SystemRoutine,
StartRoutine,
}
_SEH2_END;
- /* Set the Thread to initalized */
+ /* Set the Thread to initialized */
Thread->State = Initialized;
return Status;
}