From owner-freebsd-hackers@FreeBSD.ORG Wed May 21 15:55:19 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CEB137B401 for ; Wed, 21 May 2003 15:55:19 -0700 (PDT) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 710FE43F85 for ; Wed, 21 May 2003 15:55:18 -0700 (PDT) (envelope-from rooneg@electricjellyfish.net) Received: (qmail 6819 invoked from network); 21 May 2003 22:55:17 -0000 Received: from ool-435713c1.dyn.optonline.net (HELO electricjellyfish.net) (67.87.19.193) by relay.pair.com with SMTP; 21 May 2003 22:55:17 -0000 X-pair-Authenticated: 67.87.19.193 Date: Wed, 21 May 2003 18:55:18 -0400 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: Jay Cornwall From: Garrett Rooney In-Reply-To: <200305212245.h4LMjEVv006239@viper.evilrealms.net> Message-Id: <4B357E41-8BDF-11D7-88B0-000393CE23F4@electricjellyfish.net> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) cc: freebsd-hackers@freebsd.org cc: Julian Elischer Subject: Re: USB bulk read & pthreads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2003 22:55:19 -0000 On Wednesday, May 21, 2003, at 06:44 PM, Jay Cornwall wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 21 May 2003 00:40 am, Julian Elischer wrote: > >> You should load teh "linuxthreads" port >> and link with that.. > > Ah, I hadn't noticed there was a port of this for FreeBSD. I'll give > it a try, thanks. :) > >> 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. > > Hmm, actually this is with a FreeBSD 5.0 (RELENG_5_0) system. The > pppoa3 application uses libpthread for its threading implementation; > does FreeBSD 5.0 (5.x?) have a different system for threading as well? Under 5.0 you would be using libc_r, which is a userland threading implementation. A blocking call (like this one) will cause the whole process to block. There are two new threading libraries (libthr, which gives you basic 1-1 kernel threads, and libpthread, which gives you M-N threading) which will be available in later releases of 5.x. -garrett