[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Glibc-based Debian GNU/KNetBSD



On Mon, Dec 01, 2003 at 01:22:52PM +0100, Robert Millan wrote:
> > Please, how is threading implemented in the NetBSD (and FreeBSD)
> > port of Glibc?
> 
> The goal is porting NPTL for both KFreeBSD and KNetBSD (K for 'kernel of').
> As of now, temporary solutions are being used: linuxthreads and libpth,
> respectively.

Are you sure that's the right way to go? Porting NPTL looks likely to
require drastic design changes. NetBSD and FreeBSD kernel support for
threads is completely different than on Linux.

The design rationale for NPTL is completely different, too. Linux kernel
developers rejected M:N threading, while NetBSD and FreeBSD seem to have
seen some benefit to it. NPTL is making use of things like kernel support
for thread local storage, futexes, and altered or new system calls. None
of those exist on BSD kernels, AFAIK. Equivilent facilities will most
likely not have compatible semantics, either.

NPTL is so tied to Linux 2.6 that I'm not sure you can port it without
rewriting its core, or extensive patching of the BSD kernels. I suspect
it'd be easier to port libkse to glibc. (And the equivilent on NetBSD.)
Libc dependacies are easier to change than kernel dependacies.

	---Nathan



Reply to: