fixed DPC and APC calling code

svn path=/trunk/; revision=856
This commit is contained in:
Phillip Susi 1999-12-11 17:31:16 +00:00
parent e0e40991af
commit 14ac854378

View file

@ -47,6 +47,8 @@ static unsigned int HiSetCurrentPICMask(unsigned int mask)
return mask;
}
extern VOID KeApcProlog2();
static VOID HiSwitchIrql(KIRQL oldIrql)
/*
* FUNCTION: Switches to the current irql
@ -83,15 +85,10 @@ static VOID HiSwitchIrql(KIRQL oldIrql)
__asm__("sti\n\t");
return;
}
HiSetCurrentPICMask(0);
if(CurrentIrql == APC_LEVEL)
{
HiSetCurrentPICMask(0);
__asm__("sti\n\t");
return;
}
HiSetCurrentPICMask(0);
if (DpcQueueSize > 0 && oldIrql >= DISPATCH_LEVEL)
if (DpcQueueSize > 0 )
{
KeSetCurrentIrql(DISPATCH_LEVEL);
__asm__("sti\n\t");
@ -100,6 +97,16 @@ static VOID HiSwitchIrql(KIRQL oldIrql)
KeSetCurrentIrql(PASSIVE_LEVEL);
}
__asm__("sti\n\t");
return;
}
if( CurrentIrql == PASSIVE_LEVEL && CurrentThread->ApcState.KernelApcPending )
{
KeSetCurrentIrql( APC_LEVEL );
KeApcProlog2();
KeSetCurrentIrql( PASSIVE_LEVEL );
}
__asm__("sti\n\t");
}
VOID KeSetCurrentIrql(KIRQL newlvl)