mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fixed DPC and APC calling code
svn path=/trunk/; revision=856
This commit is contained in:
parent
e0e40991af
commit
14ac854378
1 changed files with 21 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
if (CurrentIrql == APC_LEVEL)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue