FreeBSD 8: libusb async mode + select(2) = nogo?

Peer Stritzinger peerst at gmail.com
Fri Jul 23 17:12:47 UTC 2010


Hi,

On Fri, Jul 23, 2010 at 4:57 PM, Hans Petter Selasky <hselasky at c2i.net> wrote:
>
> What are the polling flags you are using?

Do you mean the libusb_pollfd entries?

They are:

{fd = 0x7, events = 0x1}
{fd = 0xc, events = 0x45}

I translate these into select(2) params like this:

nfds = 0xc, readfds = {__fds_bits = {0x1080, 0x0 <repeats 31 times>}},
  writefds = {__fds_bits = {0x1000, 0x0 <repeats 31 times>}}, exceptfds = {
    __fds_bits = {0x0 <repeats 32 times>}},

And call select with timeout = NULL (since libusb_get_next_timeout returned 0)

Regards
-- Peer


More information about the freebsd-usb mailing list