Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2003 19:03:22 -0400 (EDT)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Garrett Rooney <rooneg@electricjellyfish.net>
Cc:        Jay Cornwall <jay@evilrealms.net>
Subject:   Re: USB bulk read & pthreads
Message-ID:  <Pine.GSO.4.10.10305211900360.22983-100000@pcnet1.pcnet.com>
In-Reply-To: <4B357E41-8BDF-11D7-88B0-000393CE23F4@electricjellyfish.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 May 2003, Garrett Rooney wrote:

> 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.

FYI, libpthread is now being installed (for x86 archs) by default
in -current and will be in 5.1-release.  It's currently installed
as libkse (use -lkse, not -pthread) and will be changed to libpthread
(-lpthread) for 5.2-release.

-- 
Dan Eischen



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