USB bulk read & pthreads
Julian Elischer
julian at elischer.org
Tue May 20 16:40:19 PDT 2003
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.
On Wed, 21 May 2003, Jay Cornwall wrote:
> -----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-----
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
More information about the freebsd-hackers
mailing list