From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <546b0d5927ae22ab3a714cabaaa0f47a@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] Re: Threads: Sewing badges of honor onto a Kernel From: Charles Forsyth In-Reply-To: <20040227120737.G22848@cackle.proxima.alt.za> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 27 Feb 2004 10:14:32 +0000 Topicbox-Message-UUID: ff455da6-eacc-11e9-9e20-41e7f4b1d025 >>Yeow! And where do I put the returned address, so that no other thread >>can stomp on it? While I attempt to use it? the process is running by then on its own stack, so the result is either in a register (EAX say) or in a temporary on the stack but either way, it's private. how does it get to its own stack in the first place? that's the bit that's been causing some of the fuss here. at least for a few years, a variant of `clone' is available that takes a pointer to the new top-of-stack for the new process, so the creating process allocates a stack somewhere somehow and passes that to clone. thus the new process is running on a private stack once it starts.