KeRaiseIrql use with two devices

I have a driver that is

I have a device that reads data from two separate pieces of hardware. I do
not want the interrupt from Device A to pre-empt the interrupt from Device B
since the data from both must read completely and buffered atomically.

I think the function KeRaiseIrql should be used to prevent preemption. My
problem is how do I ensure that the level is the highest DIrql?

Thanks in advanced.

Berto

This is what IoConnectInterrupt is for. If you have two ISR’s to
synchronize, you should be using the Synchronize IRQL parameter and use the
Spinlock parameter. Set Synchronize IRQL to the highest IRQL between the
two ISRs and then use the use the spinlock shared between both calls to
IoConnectInterrupt. CHeck out the documentation…


Mark Cariddi
Open Systems Resources, Inc.
www.osr.com
“Berto” wrote in message news:xxxxx@ntdev…
>
> I have a driver that is
>
> I have a device that reads data from two separate pieces of hardware. I do
> not want the interrupt from Device A to pre-empt the interrupt from Device
B
> since the data from both must read completely and buffered atomically.
>
> I think the function KeRaiseIrql should be used to prevent preemption. My
> problem is how do I ensure that the level is the highest DIrql?
>
> Thanks in advanced.
>
> Berto
>
>
>

Allocate your own spinlock, and specify it explicitly to both
IoConnectInterrupt calls.
Also specify the same Level value for both calls - the larger of the
two.

Max

----- Original Message -----
From: “Berto”
To: “NT Developers Interest List”
Sent: Thursday, August 01, 2002 6:31 AM
Subject: [ntdev] KeRaiseIrql use with two devices

> I have a driver that is
>
> I have a device that reads data from two separate pieces of
hardware. I do
> not want the interrupt from Device A to pre-empt the interrupt from
Device B
> since the data from both must read completely and buffered
atomically.
>
> I think the function KeRaiseIrql should be used to prevent
preemption. My
> problem is how do I ensure that the level is the highest DIrql?
>
> Thanks in advanced.
>
> Berto
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>