[Libdlo] Synchronous vs. asynchronous USB

Steve (Endurance) srevill at endurancetech.co.uk
Wed May 27 06:58:04 PDT 2009


On 26 May, Phil Endecott <spam_from_libdlo at chezphil.org> wrote:
> Steve (Endurance) wrote:
> > It was also specified to be single threaded.
>
> That's important.  Can you explain some more?  I would hope that, for 
> example, a program could talk to two devices using two threads, one per 
> device, if it wanted to.  Adding some notes about thread-safety to the 
> documentation would be a really good idea...

The main point here is that no effort is made by libdlo to deal with any of
the dlo_ API calls being reentered by a thread whilst some other thread is
already in there doing something. So any list structures, buffers, calls
into other libraries (libusb) and so on have no semaphores or other
protection from getting all messed up. This isn't an oversight; it was a
design decision to keep it simple for a single threaded application to drive.

Making libdlo support multithreading isn't too hard a task, it's just
something that hasn't been done.

Steve

-- 
Stephen Revill, Technical Project Leader           Tel: +44 (0) 1353 740 267
Endurance Technology Ltd                           Fax: +44 (0) 87 1251 7002 
5 Marine Drive West, Bognor Regis,           http://www.endurancetech.co.uk/
West Sussex, PO21 2QA, UK                 Registered in England No. 04372566
                                         VAT Registration No. GB 794 5274 86

This e-mail and any attachments may contain informtion which is confidential,
proprietary, privileged or otherwise protected by law. The information is
solely intended for the named addressee (or a person responsible for
delivering it to the addressee). If you are not the intended recipient of
this message, you are not authorized to read, print, retain, copy or
disseminate this message or any part of it. If you have received this e-mail
in error, please notify the sender immediately by return e-mail and delete it
from your computer. 


More information about the Libdlo mailing list