I have a kmdf driver that supports multiple instances of its devcie.
For one particular Ioctl:
- I allow only one instance of the request.
- I save it in a global structure.
- When an interrupt is received on any instace of the device, I complete the request.
Is this legal? I don’t see why not.
thanks
> 2) I save it in a global structure.
Use the special KMDF queue for this request personally instead, this is the simplest and recommended way for cancellation support.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Maxim S. Shatskih wrote:
> 2) I save it in a global structure.
>
Use the special KMDF queue for this request personally instead, this is the simplest and recommended way for cancellation support.
This is excellent advice. One of the primary lessons I’ve learned from
my time with KMDF is the central importance of queues. Queues are
lightweight, and liberal use of them can simplify your design considerably.
There is absolutely nothing wrong with having a manual queue that never
contains more than one request.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.