mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 15:41:23 +00:00
[FORMATTING][NTOS:IO] iomgr/irq.c
- Add a few blank lines. - Use 2 'continue'.
This commit is contained in:
parent
8e799e2d3e
commit
35d46b23f1
1 changed files with 52 additions and 46 deletions
|
@ -9,6 +9,7 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ntoskrnl.h>
|
#include <ntoskrnl.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
BOOLEAN FirstRun;
|
BOOLEAN FirstRun;
|
||||||
CCHAR Count = 0;
|
CCHAR Count = 0;
|
||||||
KAFFINITY Affinity;
|
KAFFINITY Affinity;
|
||||||
|
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Assume failure */
|
/* Assume failure */
|
||||||
|
@ -78,8 +80,9 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
for (Count = 0; Affinity; Count++, Affinity >>= 1)
|
for (Count = 0; Affinity; Count++, Affinity >>= 1)
|
||||||
{
|
{
|
||||||
/* Check if it's enabled for this CPU */
|
/* Check if it's enabled for this CPU */
|
||||||
if (Affinity & 1)
|
if (!(Affinity & 1))
|
||||||
{
|
continue;
|
||||||
|
|
||||||
/* Check which one we will use */
|
/* Check which one we will use */
|
||||||
InterruptUsed = FirstRun ? &IoInterrupt->FirstInterrupt : Interrupt;
|
InterruptUsed = FirstRun ? &IoInterrupt->FirstInterrupt : Interrupt;
|
||||||
|
|
||||||
|
@ -127,7 +130,6 @@ IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject,
|
||||||
IoInterrupt->Interrupt[(UCHAR)Count] = Interrupt++;
|
IoInterrupt->Interrupt[(UCHAR)Count] = Interrupt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Return Success */
|
/* Return Success */
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -142,6 +144,7 @@ IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
|
||||||
{
|
{
|
||||||
LONG i;
|
LONG i;
|
||||||
PIO_INTERRUPT IoInterrupt;
|
PIO_INTERRUPT IoInterrupt;
|
||||||
|
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Get the I/O Interrupt */
|
/* Get the I/O Interrupt */
|
||||||
|
@ -156,12 +159,12 @@ IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
|
||||||
for (i = 0; i < KeNumberProcessors; i++)
|
for (i = 0; i < KeNumberProcessors; i++)
|
||||||
{
|
{
|
||||||
/* Make sure one was registered */
|
/* Make sure one was registered */
|
||||||
if (IoInterrupt->Interrupt[i])
|
if (!IoInterrupt->Interrupt[i])
|
||||||
{
|
continue;
|
||||||
|
|
||||||
/* Disconnect it */
|
/* Disconnect it */
|
||||||
KeDisconnectInterrupt(&InterruptObject[i]);
|
KeDisconnectInterrupt(&InterruptObject[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Free the I/O Interrupt */
|
/* Free the I/O Interrupt */
|
||||||
ExFreePool(IoInterrupt); // ExFreePoolWithTag(IoInterrupt, TAG_KINTERRUPT);
|
ExFreePool(IoInterrupt); // ExFreePoolWithTag(IoInterrupt, TAG_KINTERRUPT);
|
||||||
|
@ -172,6 +175,7 @@ IopConnectInterruptExFullySpecific(
|
||||||
_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
|
_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Fallback to standard IoConnectInterrupt */
|
/* Fallback to standard IoConnectInterrupt */
|
||||||
|
@ -196,6 +200,7 @@ IoConnectInterruptEx(
|
||||||
_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
|
_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
|
||||||
{
|
{
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
switch (Parameters->Version)
|
switch (Parameters->Version)
|
||||||
{
|
{
|
||||||
case CONNECT_FULLY_SPECIFIED:
|
case CONNECT_FULLY_SPECIFIED:
|
||||||
|
@ -210,6 +215,7 @@ IoConnectInterruptEx(
|
||||||
DPRINT1("FIXME: Line based interrupts are UNIMPLEMENTED\n");
|
DPRINT1("FIXME: Line based interrupts are UNIMPLEMENTED\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue