Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2010 15:36:14 +0200
From:      Peer Stritzinger <peerst@gmail.com>
To:        freebsd-usb <freebsd-usb@freebsd.org>
Subject:   FreeBSD 8: libusb async mode + select(2) = nogo?
Message-ID:  <AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I'm using libusb to talk to a generic device (thats being also
developed by me), synchronous works fine now.

Asynchronous mode with blocking libusb_handle_events() works also.

Now I'm trying to also talk to non USB file descriptors.  For this I'm
using select(2), filling the sets from libusb_get_pollfds() results.

Somehow the select call never returns (no timeouts), if It gets some
external trigger (like stopping in the debugger can continuing) it
returns and has plausible return values.

Looking into libusb I find that it uses poll(2) internally.

Is select(2) supposed to work with libusb fd'?

Should I rather use poll(2)?  (I do like select more -- more BSDish).

Best regards
Peer Stritzinger



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9>