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>

next in thread | raw e-mail | index | archive | help
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

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

The problem seems to be a result of reading from a USB endpoint file=20
descriptor, which invokes tsleep() within the kernel=20
(/sys/dev/usb/usbdi_util.c:432) while it waits for data to read. This has t=
he=20
effect of blocking the whole process, rather than just the thread which=20
called the read.

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

=46orgive my lack of knowledge with the FreeBSD kernel, I've only been usin=
g it=20
for a couple of weeks. :(

Cheers,
Jay

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

iD8DBQE+yraFfJLn3O/2GbERAsFGAJ947XIElRiR0sz7U7O1nq73N0ccMACcD0bT
fWLxgfMSx9n4/1ktz+kOclU=3D
=3D1SjD
=2D----END PGP SIGNATURE-----



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