mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
- Fix a broken check in PspExitThread. We should check if Stack Swapping is _disabled_ during termination, not crash if it is enabled!
- Fix KeInitThread to respect this, and initialize EnableStackSwap to TRUE. Otherwise, only executive worker threads who modify the stack swap flag themselves encounter this issue. - This, along with my previous change, fixes worker thread termination being completely broken and crashing ros. - Thanks to Aleksey for confirming my changes svn path=/trunk/; revision=35302
This commit is contained in:
parent
7d75e41b42
commit
8091f31182
|
@ -742,7 +742,7 @@ KeInitThread(IN OUT PKTHREAD Thread,
|
|||
}
|
||||
|
||||
/* Set swap settings */
|
||||
Thread->EnableStackSwap = FALSE;//TRUE;
|
||||
Thread->EnableStackSwap = TRUE;
|
||||
Thread->IdealProcessor = 1;
|
||||
Thread->SwapBusy = FALSE;
|
||||
Thread->KernelStackResident = TRUE;
|
||||
|
|
|
@ -697,10 +697,10 @@ PspExitThread(IN NTSTATUS ExitStatus)
|
|||
PspW32ProcessCallout(CurrentProcess, FALSE);
|
||||
}
|
||||
|
||||
/* Make sure Stack Swap isn't enabled */
|
||||
if (Thread->Tcb.EnableStackSwap)
|
||||
/* Make sure Stack Swap is enabled */
|
||||
if (!Thread->Tcb.EnableStackSwap)
|
||||
{
|
||||
/* Stack swap really shouldn't be on during exit !*/
|
||||
/* Stack swap really shouldn't be disabled during exit! */
|
||||
KEBUGCHECKEX(KERNEL_STACK_LOCKED_AT_EXIT, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue