Ah, true. What confused me is that I do not get libusb_pollfd_added_cb() call
for the hotplug pipe - so I assumed such pipe is not used.
But what happens is that - libusb_init() that creates the context, calls
usbi_io_init() which creates the pipe and adds the fd's. Thus it is not
possible to get the callbacks at all - since the callbacks funcs are only later
set per-context using libusb_set_pollfd_notifiers().
Would be nice to have a way to get notifications if there are already fd's
created in libusb_init() for the context.
Additional nice thing would be if the fd_added_cb notifier could return
user_data pointer that is given back to fd_removed_cb. This would allow writing
a lot more efficient code as no internal table lookup would be needed to locate
the application specific poll data.
---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/issues/158#issuecomment-28038024
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel