- Apply the same Mm sync hacks in NtYieldExecution as is done in KiSwapThread

svn path=/trunk/; revision=35314
This commit is contained in:
Stefan Ginsberg 2008-08-13 20:12:24 +00:00
parent 1a5e7629d5
commit cd6ac84cfe

View file

@ -719,6 +719,15 @@ NtYieldExecution(VOID)
/* Sanity check */
ASSERT(OldIrql <= DISPATCH_LEVEL);
/* REACTOS Mm Hack of Doom */
MiSyncThreadProcessViews(PsGetCurrentProcess(),
((PETHREAD)NextThread)->ThreadsProcess,
sizeof(EPROCESS));
MiSyncThreadProcessViews(PsGetCurrentProcess(),
(PVOID)((PETHREAD)NextThread)->Tcb.StackLimit,
NextThread->LargeStack ?
KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE);
/* Swap to new thread */
KiSwapContext(Thread, NextThread);
Status = STATUS_SUCCESS;
@ -735,5 +744,3 @@ NtYieldExecution(VOID)
KeLowerIrql(OldIrql);
return Status;
}