>App IOCTL_RECEIVE bufferA
Driver (Dispatch function) Queue IRPofBufferA
App IOCTL_RECEIVE bufferB
Driver (Dispatch function) Queue IRPofBufferB
App WaitForMultipleObjects(2, …)Driver (DPC)
IoCompleteRequest(IRPofBufferA)
IoCompleteRequest(IRPofBufferB)
App
WaitForMultipleObjects returns with B signaled
WaitForMultipleObjects returns with A signaled
Perhaps you should only wait on a single event in the app, for the NEXT
buffer in order that you queued them. You can then wait on the following
buffer, which may have already been signaled so you will not actually suspend.
I think the question is there an ordering guarantee for
WaitForMultipleObjects, and think the answer is no. In the above example,
if we assume both buffer A and B get their event signaled in the SAME run
of the DPC, the app thread will not get a chance to run before BOTH events
are signaled.
- Jan
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com