From owner-freebsd-hackers Tue Sep 16 01:46:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA12082 for hackers-outgoing; Tue, 16 Sep 1997 01:46:32 -0700 (PDT) Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.50.29]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA12072; Tue, 16 Sep 1997 01:46:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.8.6/8.6.12) with SMTP id BAA28851; Tue, 16 Sep 1997 01:40:07 -0700 (PDT) Message-Id: <199709160840.BAA28851@lestat.nas.nasa.gov> X-Authentication-Warning: lestat.nas.nasa.gov: localhost [127.0.0.1] didn't use HELO protocol To: Mikael Karpberg Cc: dyson@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: What is wrong with this snipet? Reply-To: Jason Thorpe From: Jason Thorpe Date: Tue, 16 Sep 1997 01:40:06 -0700 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 16 Sep 1997 10:35:49 +0200 (CEST) Mikael Karpberg wrote: > This is kinda interesting. You can't move forward or backwards in the > stack, which means you can't call functions or return from functions. > You can possibly calculate two values at the same time, withing the same > function, without calling another function. This doesn't seem overly > useful, however. > > What am I missing? Could you make a short example of a use for this? What John and Julian are pointing out is that rfork(RFMEM) just can't be used like a regular fork() call - it's meant as infrastructure. Threads are typically created by specifying an entry point and argument for the new thread. The new thread has no stack to unwind; a new one has been allocated for it by some mechanism. Jason R. Thorpe thorpej@nas.nasa.gov NASA Ames Research Center Home: +1 408 866 1912 NAS: M/S 258-6 Work: +1 415 604 0935 Moffett Field, CA 94035 Pager: +1 415 428 6939