1:N threading

Geoffrey C. Speicher geoff at speicher.org
Thu Apr 3 15:44:59 PST 2003


On Thu, 3 Apr 2003, Terry Lambert wrote:

> Daniel Eischen wrote:
> > Libc_r will go bye-bye.  The KSE library will give you 1:N
> > as long as you don't use pthread_setconcurrency() and don't
> > create any PTHREAD_SCOPE_PROCESS threads.
> 
> 
> I think that maybe you need to get over the "fear factor" here.
> 
> Specifically, it's probably time to commit a "libkse", the same
> way that Jeff committed a "libthr", so that it doesn't directly
> replace "libc_r", and leave people hanging over a cliff if it
> has a bug.

I was thinking that would be nice too, until I visited
http://www.freebsd.org/kse/ and found it was already done.  To
quote:

	In order to use KSE in an application, you need to link it
	against libpthreads, which is not built by default. To build
	and install it on your system, either run make all install
	from /usr/src/lib/libpthread (if you have sources installed
	on your system), or check out the libpthread and libc modules
	from CVS. You don't need to rebuild libc, but the libpthread
	makefiles refer to parts of the libc sources.

	Linking an application against libpthread is straighforward.
	In its makefiles, change the -pthread option to -lpthread
	and relink.  Alternatively, you can copy libpthread.so on
	top of libc_r.so, but this is not recommended until
	libpthread.so becomes a bit more stable.

I'm going to give it a whirl since Jeff's overnight commits to
libthr make my system reboot every time I run mozilla.  How much
worse can libpthread be?  :)

*tinker, tinker*

Geoff



More information about the freebsd-threads mailing list