device filtering support
Hans de Goede
hdegoede at redhat.com
Fri Feb 3 07:17:09 EST 2012
Hi,
On 02/03/2012 12:27 PM, Pete Batard wrote:
<snip lots of good stuff>
> Thus I'd suggest we do it sequentially, in the order above, with the following amendments:
> 1. hotplug that doesn't rely on cross platform event handling (eg. using callbacks only, as with the Nokia proposal)
Hmm, if we do this before fixing 2, I assume that this means that the callbacks can
(and will) be called from a different thread? This may come as an unpleasant
surprise for Unix users of the API. I understand that this is unavoidable under
Windows until we fix 2. But Unix users are used to not having to think about
multi threadedness, instead relying on a select based loop.
So I think we need to make it really really really clear in the API docs that
the device removed/added callbacks are called from a different thread, and
add an option for Unix API users to disable this behavior. Of course the
Unix API users need to use the pollfd "stuff" then to make sure the callbacks
are called, but I think being able to this non multi-threaded is important
for Unix users.
> 2. cross platform event handling and hotplug refactoring to leverage those
> 3. filter/enum overhaul and additional hotplug refactoring if needed
Regards,
Hans
More information about the libusbx
mailing list