mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 12:39:50 +00:00
fixed sync bug by elevating IRQL
svn path=/trunk/; revision=825
This commit is contained in:
parent
bb25ff0f3a
commit
f9d4545552
1 changed files with 7 additions and 3 deletions
|
@ -6,8 +6,9 @@
|
||||||
* PROGRAMMER: David Welch (welch@mcmail.com)
|
* PROGRAMMER: David Welch (welch@mcmail.com)
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* 28/05/98: Created
|
* 28/05/98: Created
|
||||||
|
* 12/3/99: Phillip Susi: Fixed IRQL problem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: See also the higher level support routines in ntoskrnl/io/dpc.c
|
* NOTE: See also the higher level support routines in ntoskrnl/io/dpc.c
|
||||||
*/
|
*/
|
||||||
|
@ -101,7 +102,8 @@ BOOLEAN KeRemoveQueueDpc(PKDPC Dpc)
|
||||||
{
|
{
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
|
|
||||||
KeAcquireSpinLock(&DpcQueueLock, &oldIrql);
|
KeAcquireSpinLockAtDpcLevel( &DpcQueueLock );
|
||||||
|
KeRaiseIrql( HIGH_LEVEL, &oldIrql );
|
||||||
if (!Dpc->Lock)
|
if (!Dpc->Lock)
|
||||||
{
|
{
|
||||||
KeReleaseSpinLock(&DpcQueueLock, oldIrql);
|
KeReleaseSpinLock(&DpcQueueLock, oldIrql);
|
||||||
|
@ -126,6 +128,7 @@ BOOLEAN KeInsertQueueDpc(PKDPC dpc, PVOID SystemArgument1,
|
||||||
* FALSE otherwise
|
* FALSE otherwise
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
KIRQL oldlvl;
|
||||||
DPRINT("KeInsertQueueDpc(dpc %x, SystemArgument1 %x, SystemArgument2 %x)\n",
|
DPRINT("KeInsertQueueDpc(dpc %x, SystemArgument1 %x, SystemArgument2 %x)\n",
|
||||||
dpc, SystemArgument1, SystemArgument2);
|
dpc, SystemArgument1, SystemArgument2);
|
||||||
|
|
||||||
|
@ -139,11 +142,12 @@ BOOLEAN KeInsertQueueDpc(PKDPC dpc, PVOID SystemArgument1,
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
KeRaiseIrql( HIGH_LEVEL, &oldlvl );
|
||||||
KeAcquireSpinLockAtDpcLevel(&DpcQueueLock);
|
KeAcquireSpinLockAtDpcLevel(&DpcQueueLock);
|
||||||
InsertHeadList(&DpcQueueHead,&dpc->DpcListEntry);
|
InsertHeadList(&DpcQueueHead,&dpc->DpcListEntry);
|
||||||
DPRINT("dpc->DpcListEntry.Flink %x\n", dpc->DpcListEntry.Flink);
|
DPRINT("dpc->DpcListEntry.Flink %x\n", dpc->DpcListEntry.Flink);
|
||||||
DpcQueueSize++;
|
DpcQueueSize++;
|
||||||
KeReleaseSpinLockFromDpcLevel(&DpcQueueLock);
|
KeReleaseSpinLock( &DpcQueueLock, oldlvl );
|
||||||
dpc->Lock=(PULONG)1;
|
dpc->Lock=(PULONG)1;
|
||||||
DPRINT("DpcQueueHead.Flink %x\n",DpcQueueHead.Flink);
|
DPRINT("DpcQueueHead.Flink %x\n",DpcQueueHead.Flink);
|
||||||
DPRINT("Leaving KeInsertQueueDpc()\n",0);
|
DPRINT("Leaving KeInsertQueueDpc()\n",0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue