Date: Sat, 31 May 2003 01:39:59 -0400 (EDT) From: Daniel Eischen <eischen@pcnet.com> To: "Matthew D. Fuller" <fullermd@over-yonder.net> Cc: threads@freebsd.org Subject: Re: Transition plans: libkse->libpthread Message-ID: <Pine.GSO.4.10.10305310127160.26693-100000@pcnet5.pcnet.com> In-Reply-To: <20030531024932.GP61246@over-yonder.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 May 2003, Matthew D. Fuller wrote: > [ -threads only ] > > On Fri, May 30, 2003 at 07:58:57PM -0400 I heard the voice of > Daniel Eischen, and lo! it spake thus: > > Sometime shortly after 5.1 release, we'll (hopefully) be > > installing libpthread as "libpthread" instead of "libkse" > > by default. > > >From my comfortable position here in the peanut gallery, I've been > thinking about this. Now that we have libthr around (presumably for a > long time), mightn't it be a good idea to keep libkse and libkse, libthr > and libthr, and maybe even libc_r as libc_r, and have libpthread be a > {sym,hard}link to one of the above? No :-) In my mind, the KSE threads library was always supposed to be libpthread (note the 'p' for POSIX). libthr is not able to be fully POSIX compat because the kernel schedules threads and the kernel doesn't conform to POSIX scheduling. I know I'm in the minority, but I think libthr interfaces should "thr_foo()" (similar to Solaris libthread), not "pthread_foo()". But that prevents it from being easily used as a drop-in replacement for libc_r. > Since we're ending up with multiple > libraries implementing the pthreads API, with the presumption that > they're at least nominally interchangeable, might we not want to make > that switchability explicit? Sure, you can link with -lc_r, -lthr, or -lpthread. Or you can link to only one of them and use libmap to globally switch thread libraries. You've even got linux threads. We have a mechanism for selecting the threads library that the ports system should be using (PTHREAD_LIBS); it's just not always being obeyed by some ports. -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10305310127160.26693-100000>