Date: Tue, 20 May 2003 21:44:13 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Julian Elischer <julian@elischer.org> Cc: Jay Cornwall <jay@evilrealms.net> Subject: Re: USB bulk read & pthreads Message-ID: <3ECB041D.4FE961D@mindspring.com> References: <Pine.BSF.4.21.0305201638000.22764-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote: > On Wed, 21 May 2003, Jay Cornwall wrote: > > The problem seems to be a result of reading from a USB endpoint file > > descriptor, which invokes tsleep() within the kernel > > (/sys/dev/usb/usbdi_util.c:432) while it waits for data to read. This has the > > effect of blocking the whole process, rather than just the thread which > > called the read. > > You should load teh "linuxthreads" port > and link with that.. > > under 5.x you will be able to use the native threads (we will have > several to choose from :-) > > under 4.x (I presume that's what you are using) the threading is all in > one process and if a device decides to return "data waiting" in select() > but keeps the reader waiting, it will block the entire process. Or it's a bug in the USB driver, not honoring non-blocking I/O. -- Terry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ECB041D.4FE961D>