mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- Remove some FPU deprecated constants and use the new ones.
- Deliver APCs on return from context switch with pending kernel APCs. svn path=/trunk/; revision=23625
This commit is contained in:
parent
893a8bcac6
commit
43d5f7e90d
3 changed files with 4 additions and 11 deletions
|
@ -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__
|
||||
|
|
|
@ -330,10 +330,10 @@ KiGetFpuState(PKTHREAD Thread)
|
|||
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 @@ KiGetFpuState(PKTHREAD Thread)
|
|||
KeGetCurrentPrcb()->NpxThread = NULL;
|
||||
}
|
||||
Ke386SetCr0(Cr0);
|
||||
Thread->NpxState = NPX_STATE_VALID;
|
||||
Thread->NpxState = NPX_STATE_LOADED;
|
||||
}
|
||||
}
|
||||
KeLowerIrql(OldIrql);
|
||||
|
@ -382,7 +382,7 @@ KiHandleFpuFault(PKTRAP_FRAME Tf, ULONG ExceptionNr)
|
|||
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");
|
||||
|
||||
|
|
|
@ -210,7 +210,6 @@ KiSwapThread(VOID)
|
|||
DPRINT("Dispatching Thread as blocked\n");
|
||||
ApcState = KiDispatchThreadNoLock(Waiting);
|
||||
|
||||
#if 0
|
||||
/* Check if we need to deliver APCs */
|
||||
if (ApcState)
|
||||
{
|
||||
|
@ -221,7 +220,6 @@ KiSwapThread(VOID)
|
|||
KiDeliverApc(KernelMode, NULL, NULL);
|
||||
ASSERT(CurrentThread->WaitIrql == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Lower IRQL back to what it was */
|
||||
KfLowerIrql(CurrentThread->WaitIrql);
|
||||
|
|
Loading…
Reference in a new issue