mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
- Apply the same Mm sync hacks in NtYieldExecution as is done in KiSwapThread
svn path=/trunk/; revision=35314
This commit is contained in:
parent
1a5e7629d5
commit
cd6ac84cfe
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue