My coworker is writing an app to interface my driver.
My kmdf driver has two ioctls:
IOCTL_NOTIFY which blocks indefinitely with STATUS_PENDING
IOCTL_CANCEL_NOTIFY which cancels the first ioctl.
If I run the app:
Process A:
Thread 1) issues IOCTL_NOTIFY and blocks (non-overlapped i/o)
Thread 2) issues IOCTL_CANCEL_NOTIFY, but the ioctl never makes it to the driver.
However if I run a second instance of the app from process B:
Process B:
Thread ) issues IOCTL_CANCEL_NOTIFY, it works.
It seems like i/o requests are serialized per process in this case not per thread. Any insight is appreciated.
Thanks,
Open the handle as overlapped. A non overlapped handle allows only one pending io at a time.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, April 20, 2010 10:40 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] i/o requests are serialized per process
My coworker is writing an app to interface my driver.
My kmdf driver has two ioctls:
IOCTL_NOTIFY which blocks indefinitely with STATUS_PENDING IOCTL_CANCEL_NOTIFY which cancels the first ioctl.
If I run the app:
Process A:
Thread 1) issues IOCTL_NOTIFY and blocks (non-overlapped i/o)
Thread 2) issues IOCTL_CANCEL_NOTIFY, but the ioctl never makes it to the driver.
However if I run a second instance of the app from process B:
Process B:
Thread ) issues IOCTL_CANCEL_NOTIFY, it works.
It seems like i/o requests are serialized per process in this case not per thread. Any insight is appreciated.
Thanks,
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
> It seems like i/o requests are serialized per process in this case not per thread
If FILE_FLAG_OVERLAPPED is not used, the IO requests are serialized per handle.
So, use FILE_FLAG_OVERLAPPED or open the second handle just to send a cancel.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com