Could you suggest the best way to implement the following.
I’m getting IRQ from an external device when it signals that it’s
ready to exchange some information to the driver. The information
exchange process would take about 50 milliseconds. Is it
possible (and is it correct) for ISR’s DPC to be executing for such a
long time? If not, should that be implemented using system thread? Or
in any other way?
I’m getting IRQ from an external device when it signals that it’s
ready to exchange some information to the driver. The information
exchange process would take about 50 milliseconds. Is it
possible (and is it correct) for ISR’s DPC to be executing for such a
long time? If not, should that be implemented using system thread? Or
in any other way?
Bear in mind that you can’t block a thread in a DPC routine (since
you’re at DISPATCH_LEVEL). I’m not sure how your device behaves, but I’d
guess that this 50 ms “information exchange” process requires some timed
delays or some busy-polling loops. If the delays are on the order of
microseconds, your device is basically just a cpu hog and you’ll
probably need to service it in the DPC routine after all, with calls to
KeStallExecutionProcessor as needed to implement the delays. The machine
may not be useful for much else, but that could be okay in a dedicated
application setting.
If the delays need to be longer than a few microseconds, you’re probably
best off to use either a workitem or a dedicated system thread. You
still need a DPC to queue the workitem or to signal your dedicated
thread that there’s work to do (because you can’t do those things at
DIRQL).
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com
----- Original Message -----
From: “D. Lex” To: “NT Developers Interest List” Sent: Monday, June 02, 2003 7:41 PM Subject: [ntdev] Long-processing DPC for ISR
> Hi All, > > Could you suggest the best way to implement the following. > > I’m getting IRQ from an external device when it signals that it’s > ready to exchange some information to the driver. The information > exchange process would take about 50 milliseconds. Is it > possible (and is it correct) for ISR’s DPC to be executing for such a > long time? If not, should that be implemented using system thread? Or > in any other way? > > – > Best regards, > D. > — > You are currently subscribed to ntdev as: xxxxx@storagecraft.com > To unsubscribe send a blank email to xxxxx@lists.osr.com