From owner-freebsd-current Fri Sep 19 08:15:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA17714 for current-outgoing; Fri, 19 Sep 1997 08:15:28 -0700 (PDT) Received: from pluto.plutotech.com (ken@mail.plutotech.com [206.168.67.137]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA17708 for ; Fri, 19 Sep 1997 08:15:26 -0700 (PDT) Received: (from ken@localhost) by pluto.plutotech.com (8.8.5/8.8.5) id JAA04986; Fri, 19 Sep 1997 09:15:04 -0600 (MDT) From: Kenneth Merry Message-Id: <199709191515.JAA04986@pluto.plutotech.com> Subject: Re: FYI: regarding our rfork(2) In-Reply-To: <199709191417.KAA28139@khavrinen.lcs.mit.edu> from Garrett Wollman at "Sep 19, 97 10:17:57 am" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Fri, 19 Sep 1997 09:15:04 -0600 (MDT) Cc: toor@dyson.iquest.net, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Garrett Wollman wrote... > < said: > > > We are actually doing a pure memory sharing operation. We will be sharing > > everything, plan 9 doesn't appear to share the stack. In order to support > > pthreads, (and most thread schemes that I have seen), it is best to allow > > full access to all of the thread stacks. The 'full sharing' scheme is very > > fast. > > We ought to emulate SGI's sproc(2) system call as well, which does > essentially the same thing. It has the useful feature that it takes > as an argument the address of a function to call, and does all the > stack creation magic internally before calling same. So, the inner > loop of a program I wrote a long time ago on an SGI looks like this: I agree with Garrett... I've done coding under IRIX, and sproc() definitely is a handy system call. The ability to specify a function pointer for the main routine of the thread is especially nice. Ken -- Kenneth Merry ken@plutotech.com