[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-smartcardddk
Subject:    Re: CustomDPC question
From:       Klaus Schutz <kschutz () MICROSOFT ! COM>
Date:       1998-08-26 18:22:03
[Download RAW message or body]


Dave,

these DPCs DO run on DISPATCH_LEVEL. The documentation says, that a DPC will
be executed as
soon as the IRQ level drops below DISPATCH_LEVEL. That simply means, that as
long as
the CPU is on DISPATCH_LEVEL or above your DPC won't be executed.

Here is what happens:
IRQ state:
IRQ_HIGH or IRQ_DISPATCH        You call KeInsertQueueDpc
IRQ_HIGH or IRQ_DISPATCH        ...
IRQ_APC or IRQ_PASSIVE          OS raises the level back to back to DISPATCH
and executes your DPC

You could schedule a system worker thread to run at passive level.
Just use ExQueueWorkItem, but note, you can only queue a work item at
DISPATCH_LEVEL.

Klaus U. Schutz
Microsoft


-----Original Message-----
From: Dave Brown [mailto:dave_brown@DW-TECH.COM]
Sent: Wednesday, August 26, 1998 10:32 AM
To: SmartCardDDK@DISCUSS.MICROSOFT.COM
Subject: CustomDPC question


I'm attempting to use the zw file functions for event logging (propritary
file, not NT event viewer) and have run into some problems because they can
only be executed at IRQL PASSIVE_LEVEL. I installed a CustomDPC since
they're supposed to be called below DISPATCH_LEVEL. My problem is that when
the custom dpc callback is called I call KeGetCurrentIrql and it returns
DISPATCH_LEVEL.

How is this possible and is their a better way to ensure that I'm running
and PASSIVE_LEVEL?

Thanks,

Dave Brown

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic