usb_interrupt_read blocks "forever" sometimes
Daniel O'Connor
doconnor at gsoft.com.au
Wed Feb 10 09:31:50 UTC 2010
On Wed, 10 Feb 2010, Hans Petter Selasky wrote:
> I would not recommend using signals with libusb. It is not portable.
> Currently signals are ignored. What you would have to do, is to use
OK.
> the timeout argument which you are doing, and have a timekeeper
> variable somewhere, or create another thread. Still, when using the
> timeout there is a chance you can loose data.
The problem is that the timeout seems to be ignored sometimes - that is
the only reason I was playing with alarm() at all.
I have the timeout set to 100 (milliseconds?) yet I find if I restart
the program every now and then it will get stuck on the first read.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20100210/663774c0/attachment.pgp
More information about the freebsd-usb
mailing list