USB bulk read & pthreads
Jay Cornwall
jay at evilrealms.net
Tue May 20 16:13:09 PDT 2003
-----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-----
More information about the freebsd-hackers
mailing list