Some Debian developers and users are creating a new (but as of yet unincluded
in unstable) Debian port that uses the FreeBSD kernel as well as the GNU
userland (glibc, coreutils, etc.). We call this port GNU/kFreeBSD, and so
far, it runs on i386-style machines only (i486-i686 inclusive). In order to
do this, we have ported glibc 2.3 to the FreeBSD kernel, based mostly off the
work of Bruno Haible. We have a (mostly) working threads implementation with
LinuxThreads (e.g. KDE works). However, I have seen in the CVS repository
that glibc 2.4 will not support LinuxThreads any longer . As a
consequence, I feel it is essential to port NPTL to the FreeBSD kernel for
the port's continued health.
We are currently using FreeBSD 5.4 as the basis; when we figure out why the
FreeBSD 6.0 kernel/glibc combination doesn't like sshd anymore and fix it, we
will likely move to that.
I am not asking for people to do this task; I will do it, but I have some
Are there any portability traps of which I need to be aware (other than the
FreeBSD's libpthread/libkse is M:N, while libthr is 1:1. I am unsure whether
libthr's kernel support works on i386, so I'd like to get NPTL to
conditionally support M:N if possible. Is this a silly idea?
Is there anything else important that I need to know?
On Sat, Nov 12, 2005 at 01:38:38AM +0000, Brian M. Carlson wrote:
> Are there any portability traps of which I need to be aware (other than the
Like that the library is fundamentally designed around Linux process
assumption, ELF TLS, and the futex system?
A fully POSIX thread library for your port is a good idea, which LinuxThreads
isn't. However, I am skeptical about how much mileage you'll be able
to get from NPTL without duplicating some of its interfaces in FreeBSD.
> FreeBSD's libpthread/libkse is M:N, while libthr is 1:1. I am unsure whether
> libthr's kernel support works on i386, so I'd like to get NPTL to
> conditionally support M:N if possible. Is this a silly idea?
Yes, this is a silly idea. NPTL is built on the assumption that kernel
processes are extremely lightweight.