Re: kernel threading/clone() improvements in 2.1?

Christopher J. Shaulis (cjs@netcom.com)
Mon, 22 Jul 1996 21:18:51 -0400 (EDT)


> Are there any official (or unofficial) plans to fix some of the problems
> with clone() in 2.1 and/or get it added officially to libc?

I would love to see threading in stock libc -- especually now that
there are several working kernel thread libraries.

The big problemo is that the libc author has elected to make
threadsafe functions by putting locks around all the functions. I and
most of the people on the Linux-kernel mailing list think this is dead
wrong, and would rather see thread-safe functions done as functions
taking pointers to storage normally provided for by global varibles --
the locking mechanism around malloc() should be enough. I am
particular would like to take things one step farther where the normal
libc functions are wrappers for the threadsafe ones that work with the
traditional global varible.

The other problem at the moment comes from the kernel side.. as
certain function calls cannot be called by two threads on the same vm
at the same time, or other functions are not setup to deal with the
possability of memory becoming invalid while in a system call.

But things are coming together slowly. We should all be threading
maniacs in no time. Biggest chore will be getting the libc author to
accept patches. The rest is easy.

Christopher