Date: Fri, 23 Jul 2010 19:12:46 +0200 From: Peer Stritzinger <peerst@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: FreeBSD 8: libusb async mode + select(2) = nogo? Message-ID: <AANLkTi=a__R7gNvE371zs1vNpMXLFXS-09joihFQc-_H@mail.gmail.com> In-Reply-To: <201007231657.47682.hselasky@c2i.net> References: <AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9@mail.gmail.com> <201007231657.47682.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Fri, Jul 23, 2010 at 4:57 PM, Hans Petter Selasky <hselasky@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=a__R7gNvE371zs1vNpMXLFXS-09joihFQc-_H>