[sane-devel] USB device locking in the snapscan backend
Giuseppe Sacco
giuseppe at eppesuigoccas.homedns.org
Sat Mar 1 08:46:13 UTC 2008
On Sun, 24 Feb 2008 17:12:17 +0100 Julien BLACHE <jb at jblache.org> wrote:
> Hi,
>
> The snapscan backend uses a mutex to lock the USB device it's working
> with when sending "atomic" commands.
>
> We're not talking about pthread mutexes here, which is one of the
> available implementations, but IPC semaphores.
[...]
> I've started patching sanei_usb to add a method to return the full
> path to the USB device node, except libusb doesn't expose this
> information. Second-guessing is obviously not an option :|
>
> And there is the UsbCalls access method that needs to be fixed if it
> can be used along with IPC semaphores and I don't know anything about
> UsbCalls...
[...]
No many other options have been proposed, other then decoupling on the frontend and leaving the backend single threated. I like this idea but I cannot guess the right impact it may have on all backends.
I would also like to know what problems are already known about using pthread on linux for SANE backends. Anyone tested it? How do I test it?
Bye,
Giuseppe
More information about the sane-devel
mailing list