mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:IO] IoConnectInterrupt(): Fix default spinlock initialization (#6503)
Addendum to commit d1258e99f
(r16229).
This commit is contained in:
parent
cbc78e0629
commit
2d442956b4
2 changed files with 8 additions and 5 deletions
|
@ -35,7 +35,6 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
PKINTERRUPT Interrupt;
|
PKINTERRUPT Interrupt;
|
||||||
PKINTERRUPT InterruptUsed;
|
PKINTERRUPT InterruptUsed;
|
||||||
PIO_INTERRUPT IoInterrupt;
|
PIO_INTERRUPT IoInterrupt;
|
||||||
PKSPIN_LOCK SpinLockUsed;
|
|
||||||
BOOLEAN FirstRun;
|
BOOLEAN FirstRun;
|
||||||
CCHAR Count = 0;
|
CCHAR Count = 0;
|
||||||
KAFFINITY Affinity;
|
KAFFINITY Affinity;
|
||||||
|
@ -64,8 +63,12 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
TAG_KINTERRUPT);
|
TAG_KINTERRUPT);
|
||||||
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Select which Spinlock to use */
|
/* Use the structure's spinlock, if none was provided */
|
||||||
SpinLockUsed = SpinLock ? SpinLock : &IoInterrupt->SpinLock;
|
if (!SpinLock)
|
||||||
|
{
|
||||||
|
SpinLock = &IoInterrupt->SpinLock;
|
||||||
|
KeInitializeSpinLock(SpinLock);
|
||||||
|
}
|
||||||
|
|
||||||
/* We first start with a built-in Interrupt inside the I/O Structure */
|
/* We first start with a built-in Interrupt inside the I/O Structure */
|
||||||
*InterruptObject = &IoInterrupt->FirstInterrupt;
|
*InterruptObject = &IoInterrupt->FirstInterrupt;
|
||||||
|
@ -87,7 +90,7 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
KeInitializeInterrupt(InterruptUsed,
|
KeInitializeInterrupt(InterruptUsed,
|
||||||
ServiceRoutine,
|
ServiceRoutine,
|
||||||
ServiceContext,
|
ServiceContext,
|
||||||
SpinLockUsed,
|
SpinLock,
|
||||||
Vector,
|
Vector,
|
||||||
Irql,
|
Irql,
|
||||||
SynchronizeIrql,
|
SynchronizeIrql,
|
||||||
|
|
|
@ -349,7 +349,7 @@ KeInitializeInterrupt(IN PKINTERRUPT Interrupt,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This means we'll be usin the built-in one */
|
/* Use the built-in one */
|
||||||
KeInitializeSpinLock(&Interrupt->SpinLock);
|
KeInitializeSpinLock(&Interrupt->SpinLock);
|
||||||
Interrupt->ActualLock = &Interrupt->SpinLock;
|
Interrupt->ActualLock = &Interrupt->SpinLock;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue