Synchronization on multiple USB read/writes

Discussion in 'Windows Vista Drivers' started by Gerard Harkema, Apr 18, 2008.

  1. In our USB KMDF driver we control a data-acquisition device. Data transfer is
    a three stage action. First we send a command to the device, the the actual
    data and after that we receive the status of the operation. We are using the
    WdfUsbTargetPipeWriteSynchronously/WdfUsbTargetPipeReadSynchronously
    functions to communicate whit our USB device. When we issue a DeviceIoControl
    we receive the request in the default queue (WdfIoQueueDispatchParallel) and
    the request is forwarded to an other Queue (WdfIoQueueDispatchSequential). De
    we need extra syncronization to prevent other requests from "breaking in" in
    the dispatching request.

    Kind Regards,

    Gerard
     
    Gerard Harkema, Apr 18, 2008
    #1
    1. Advertisements

  2. if all i/o to the device is going through the serial queue, you have the
    synchronization you want. the serialized queue will act as a lock around
    the access to the resource (your usb pipe)

    d
     
    Doron Holan [MSFT], Apr 22, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.