From: Doron Holan [MSFT] on
to provide an additional point of clarity, EvtUsbTargetPipeReadComplete and
EvtUsbTargetPipeReadersFailed are synchronized against each other, even
though they are not synchronized against any other clients

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Arnaud" <adebaene(a)club-internet.fr> wrote in message
news:96809cb2-825d-4cd0-b452-d7019db9277a(a)l35g2000vba.googlegroups.com...
> Thanks for the clarification... Indeed a warning on the documentation
> page for WdfUsbTargetPipeConfigContinuousReader would be welcome,
> since I suspect this is quite a common problem...
> I threfore need to acquire the device lock by hand if I need to
> synchronize access to the Device Extension... (using
> WdfObjectAcquireLock, right??)
>
> Also, the sample osrusbfx2\final uses an USB continuous reader but do
> NOT synchronize with other parts of the driver in the completion
> routine (OsrFxEvtUsbInterruptPipeReadComplete). Since this function
> updates CurrentSwitchState in the Device Context, I believe acquiring
> a lock would be a good idea : it is not strictly necessary in the
> sample since CurrentSwitchStatus is never touched by any other
> execution path, but for educationnal purposes, acquiring the lock - or
> at least a comment about it, would be great.
>
> Anyway, thanks for the answer!
>
> Arnaud
>
>
>
> On 3 oct, 00:28, "Abhishek R [MSFT]" <abhish...(a)online.microsoft.com>
> wrote:
>> BTW, we will get this documented more explicitly. Thanks.
>>
>> "Abhishek R [MSFT]" <abhish...(a)online.microsoft.com> wrote in
>> messagenews:eyfuCM5QKHA.3540(a)TK2MSFTNGP04.phx.gbl...
>>
>>
>>
>> > The USB continuous reader callbacks (and any other I/O target related
>> > callbacks) are not synchronized by framework with respect to other
>> > callbacks, even if you specify automatic synchronization.
>>
>> > "Arnaud" <adeba...(a)club-internet.fr> wrote in message
>> >news:f1a52203-6fa1-4173-b8fd-e0a718ec42d6(a)a7g2000yqo.googlegroups.com...
>> >> Hello all,
>>
>> >> I am developping an USB function driver using KMDF 1.7, and I intend
>> >> to use the USB continuous reader to poll an Interrupt In pipe on my
>> >> device.
>> >> The documentation is not very clear about the synchronisation of
>> >> callbacks functions (the EvtUsbTargetPipeReadComplete and
>> >> EvtUsbTargetPipeReadersFailed callbacks).... Does the KMDF framework
>> >> synchronize calls to these methods with other synchronized callbacks
>> >> of my driver (queues routines, DPCs, Interupts, etc... if they are
>> >> configured for automatic synchronsiation).
>> >> I suppose that the Continuous Reader is implemented using DPCs, but
>> >> this doesn't means wether they are synchronized...
>>
>> >> Thanks!
>>
>> >> Arnaud- Masquer le texte des messages pr�c�dents -
>>
>> - Afficher le texte des messages pr�c�dents -
>
First  |  Prev  | 
Pages: 1 2
Prev: test 51808
Next: DDK Version history