Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2010 16:57:47 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Subject:   Re: FreeBSD 8: libusb async mode + select(2) = nogo?
Message-ID:  <201007231657.47682.hselasky@c2i.net>
In-Reply-To: <AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9@mail.gmail.com>
References:  <AANLkTikk7L-63c6wQb0YKoYovGKPcT932Lc9n6mRrmK9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 23 July 2010 15:36:14 Peer Stritzinger wrote:
> 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).
> 

What are the polling flags you are using?

--HPS



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