[Top] [All Lists]

Re: thread-ready ABIs

To: "Kevin D. Kissell" <>
Subject: Re: thread-ready ABIs
From: Daniel Jacobowitz <>
Date: Tue, 22 Jan 2002 12:13:30 -0500
Cc: Dominic Sweetman <>, Ralf Baechle <>, Ulrich Drepper <>, Mike Uhler <>, "MIPS/Linux List (SGI)" <>, "H . J . Lu" <>
In-reply-to: <00c001c1a367$69c10160$0deca8c0@Ulysses>
References: <m3elkoa5dw.fsf@myware.mynet><><01b801c1a081$3f6518e0$0deca8c0@Ulysses><><m3d703thl6.fsf@myware.mynet><01be01c1a2d7$6ec299c0$0deca8c0@Ulysses> <> <002001c1a33e$d9936560$0deca8c0@Ulysses> <> <007601c1a35e$b3e3f940$0deca8c0@Ulysses> <> <00c001c1a367$69c10160$0deca8c0@Ulysses>
User-agent: Mutt/1.3.23i
On Tue, Jan 22, 2002 at 06:08:12PM +0100, Kevin D. Kissell wrote:
> > Perhaps I'm mangling terminology.  LinuxThreads is a one-to-one mapping
> > of kernel threads to user threads.  All the kernel threads, and thus
> > all the user threads, share the same memory region - including the
> > stack region.  Their stacks are differentiated solely by different
> > values in the stack pointer register.  Thus I don't think what you're
> > suggesting is possible.
> I don't see how fork() semantics can be preserved unless
> the stack regions are replicated (copy-on-write) on a fork().
> Under ATT and BSD Unix (which is where I did most of
> my kernel hacking in the old days) that was the *only*
> way to get a new kernel thread, so it was "obvious"
> that my proposed hack would work.  Linux does have
> the clone() function as well, and if LinuxThreads are
> implemented in terms of clone(foo, stakptr, CLONE_VM, arg),
> you are correct, the proposed scheme would not work
> without modification.

Which it is.  Fork shares no memory regions; vfork/clone share all
memory regions.  AFAIK there is no share-heap-but-not-stack option in

Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

<Prev in Thread] Current Thread [Next in Thread>