On May 24, 2013, at 10:44 AM, Sean McBride <s...@rogue-research.com> wrote:
> On Fri, 24 May 2013 18:37:48 +0200, Hans de Goede said: > >>> Yup, there will probably be a race there but the fix may be a little >> more complicated than >>> it is under Linux. >> >> So the question then maybe if there are any apps doing hotplug already >> (and thus on >> their own) for darwin, if there are no such apps, then we may consider >> simply not >> fixing this under darwin. > > I haven't followed this 'hotplugging' discussion much, and am not even sure > if the term has some exact USB-specific meaning beyond the term's generic > meaning, but anyway... > > We use the OS X IOServiceAddMatchingNotification() API to watch for the > plugging/unplugging of the vendor/product ID that we are interested in. When > the OS calls us back when a device is plugged in, we ask libusbx to > reemumerate all devices. It would be nice if we could just pass the new > io_service_t to libusbx… 1.2.0 will have a hotplug API so you won't need to do this yourself. Your app may not work as is with 1.2.0 due to a race between the darwin backend enumerating the device and your call to libusb_get_device_list() but I can fix it if there is a need. -Nathan ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel