mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +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 InterruptUsed;
|
||||
PIO_INTERRUPT IoInterrupt;
|
||||
PKSPIN_LOCK SpinLockUsed;
|
||||
BOOLEAN FirstRun;
|
||||
CCHAR Count = 0;
|
||||
KAFFINITY Affinity;
|
||||
|
@ -64,8 +63,12 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
|||
TAG_KINTERRUPT);
|
||||
if (!IoInterrupt) return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
/* Select which Spinlock to use */
|
||||
SpinLockUsed = SpinLock ? SpinLock : &IoInterrupt->SpinLock;
|
||||
/* Use the structure's spinlock, if none was provided */
|
||||
if (!SpinLock)
|
||||
{
|
||||
SpinLock = &IoInterrupt->SpinLock;
|
||||
KeInitializeSpinLock(SpinLock);
|
||||
}
|
||||
|
||||
/* We first start with a built-in Interrupt inside the I/O Structure */
|
||||
*InterruptObject = &IoInterrupt->FirstInterrupt;
|
||||
|
@ -87,7 +90,7 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
|||
KeInitializeInterrupt(InterruptUsed,
|
||||
ServiceRoutine,
|
||||
ServiceContext,
|
||||
SpinLockUsed,
|
||||
SpinLock,
|
||||
Vector,
|
||||
Irql,
|
||||
SynchronizeIrql,
|
||||
|
|
|
@ -349,7 +349,7 @@ KeInitializeInterrupt(IN PKINTERRUPT Interrupt,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* This means we'll be usin the built-in one */
|
||||
/* Use the built-in one */
|
||||
KeInitializeSpinLock(&Interrupt->SpinLock);
|
||||
Interrupt->ActualLock = &Interrupt->SpinLock;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue