Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2003 16:40:14 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Jay Cornwall <jay@evilrealms.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: USB bulk read & pthreads
Message-ID:  <Pine.BSF.4.21.0305201638000.22764-100000@InterJet.elischer.org>
In-Reply-To: <200305210013.09834.jay@evilrealms.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0305201638000.22764-100000>