Author: ion Date: Mon Aug 21 00:27:03 2006 New Revision: 23625
URL: http://svn.reactos.org/svn/reactos?rev=23625&view=rev Log: - Remove some FPU deprecated constants and use the new ones. - Deliver APCs on return from context switch with pending kernel APCs.
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h trunk/reactos/ntoskrnl/ke/i386/fpu.c trunk/reactos/ntoskrnl/ke/kthread.c
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h Mon Aug 21 00:27:03 2006 @@ -42,11 +42,6 @@
#define DR7_ACTIVE 0x00000055 /* If any of these bits are set, a Dr is active */
-/* Possible values for KTHREAD's NpxState */ -#define NPX_STATE_INVALID 0x01 -#define NPX_STATE_VALID 0x02 -#define NPX_STATE_DIRTY 0x04 - #define FRAME_EDITED 0xFFF8
#ifndef __ASM__
Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/fpu.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/fpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/fpu.c Mon Aug 21 00:27:03 2006 @@ -330,10 +330,10 @@ ULONG Cr0;
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - if (Thread->NpxState & NPX_STATE_VALID) + if (Thread->NpxState & NPX_STATE_LOADED) { FxSaveArea = (PFX_SAVE_AREA)((ULONG_PTR)Thread->InitialStack - sizeof (FX_SAVE_AREA)); - if (Thread->NpxState & NPX_STATE_DIRTY) + if (Thread->NpxState & NPX_STATE_NOT_LOADED) { ASSERT(KeGetCurrentPrcb()->NpxThread == Thread);
@@ -349,7 +349,7 @@ KeGetCurrentPrcb()->NpxThread = NULL; } Ke386SetCr0(Cr0); - Thread->NpxState = NPX_STATE_VALID; + Thread->NpxState = NPX_STATE_LOADED; } } KeLowerIrql(OldIrql); @@ -382,7 +382,7 @@ CurrentThread = KeGetCurrentThread(); ASSERT(CurrentThread != NULL);
- CurrentThread->NpxState |= NPX_STATE_DIRTY; + CurrentThread->NpxState |= NPX_STATE_NOT_LOADED; KeLowerIrql(oldIrql); DPRINT("Device not present exception handled!\n");
Modified: trunk/reactos/ntoskrnl/ke/kthread.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/kthread.c?rev=2... ============================================================================== --- trunk/reactos/ntoskrnl/ke/kthread.c (original) +++ trunk/reactos/ntoskrnl/ke/kthread.c Mon Aug 21 00:27:03 2006 @@ -210,7 +210,6 @@ DPRINT("Dispatching Thread as blocked\n"); ApcState = KiDispatchThreadNoLock(Waiting);
-#if 0 /* Check if we need to deliver APCs */ if (ApcState) { @@ -221,7 +220,6 @@ KiDeliverApc(KernelMode, NULL, NULL); ASSERT(CurrentThread->WaitIrql == 0); } -#endif
/* Lower IRQL back to what it was */ KfLowerIrql(CurrentThread->WaitIrql);