Re: File Storage Gadget Driver - a small doubt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 7, 2009 at 7:47 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:

Dear Alan,

Thanks again for the information.

> That's not true.  The driver can be made to work asynchronously with
> only one thread.  All you have to do is implement a queue of incoming
> commands.  The thread can process the commands one at a time, as they
> reach the head of the queue.

In brief, the gadget driver is queuing the incoming commands. This is
done by the main thread. The other threads will de-queue one command
at a time and process it. My question is, while one thread processing
the first command, can another thread process the second command? Can
two commands be processed in parallel in two different threads?

Please let me know.

>> Please refer to
>> same thread dated on 22-July-2009 which describes about the design.
>
> Are you referring to this message?
>
>        http://marc.info/?l=linux-usb&m=124835453113445&w=2

Yes. That is correct.

> It describes the design briefly, but it does not explain why you chose
> to use two threads instead of a simpler single-thread design.

Actually, my device is a UAS device which can process the more than
one command at a time. I am implementing the simulator for the same
device. That is the reason, I am using multiple threads to process
multiple commands in parallel.

Please let me know if there are any concerns.

Thanks and Regards,
Madhavi M
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux