Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2003 00:13:07 +0100
From:      Jay Cornwall <jay@evilrealms.net>
To:        freebsd-hackers@freebsd.org
Subject:   USB bulk read & pthreads
Message-ID:  <200305210013.09834.jay@evilrealms.net>

index | next in thread | raw e-mail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I've been trying (unsuccessfully) to make the thread-based pppoa3 program 
(from http://speedtouch.sf.net/) able to work correctly under FreeBSD. Near 
identical code works fine under Linux, but the threading doesn't work at all 
in FreeBSD.

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.

I'm sure there are good reasons for implementing it in this way, but I'd be 
interested to hear what they are, and if any alternative approaches had 
been/are being considered.

Forgive my lack of knowledge with the FreeBSD kernel, I've only been using it 
for a couple of weeks. :(

Cheers,
Jay

- -- 
http://www.evilrealms.net/ - Systems Administrator & Developer
http://www.ic.ac.uk/ - Imperial College, 2nd year CS student
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+yraFfJLn3O/2GbERAsFGAJ947XIElRiR0sz7U7O1nq73N0ccMACcD0bT
fWLxgfMSx9n4/1ktz+kOclU=
=1SjD
-----END PGP SIGNATURE-----


help

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