From owner-freebsd-current Sun Mar 21 6: 2: 5 1999 Delivered-To: freebsd-current@freebsd.org Received: from zone.syracuse.net (zone.syracuse.net [209.2.141.6]) by hub.freebsd.org (Postfix) with ESMTP id 72F0A14FA3; Sun, 21 Mar 1999 06:02:03 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by zone.syracuse.net (8.9.2/8.9.2) with ESMTP id OAA01195; Sun, 21 Mar 1999 14:01:31 GMT (envelope-from green@unixhelp.org) Date: Sun, 21 Mar 1999 14:01:31 +0000 (GMT) From: Brian Feldman X-Sender: green@zone.syracuse.net To: Matthew Dillon Cc: Alfred Perlstein , "John S. Dyson" , samit@usa.ltindia.com, commiters@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: rfork() In-Reply-To: <199903210743.XAA09505@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 20 Mar 1999, Matthew Dillon wrote: > > :> > rfork(RFMEM) doesn't easily work from C. You need to > :> > create an assembly stub. > :> > > :> > -- > :> > John | Never try to teach a pig to sing, > :> > dyson@iquest.net | it makes one look stupid > :> > jdyson@nc.com | and it irritates the pig. > :> > > :> > :> I've seen about 6 people ask about this because the manual lies about > :> what is done. I asked a while back about it, and John was kind enough > :> to dig up some code that used rfork to properly split the stack should > :> I try to dig it up? > :> > :> In the meantime, can someone commit this or suggest something? > : > :For the suggest something, you realize that with Richard's VM_STACK code it > :should be relatively trivial to make this automatic (suggestion: add > :RFSTACK flag). > : > : Brian Feldman _ __ ___ ___ ___ > : green@unixhelp.org _ __ ___ | _ ) __| \ > : http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | > : FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ > > If the goal is to completely share the address space, which > RFMEM does, you can't split anything, not even the stack. It > sure would be useful if there were a standard clib call adequate > for calling rfork() and calling a function in the child w/ a new > stack. Hence the NEW flag RFSTACK. Why would this be a bad thing? This would keep the old behavior and allow much nicer new behavior. I didn't suggest changing the old behavior. This would just greatly simplify things so all of the assembly wouldn't be needed. Hmm... actually... if one were to mmap() a stack and as soon as the rfork() returned movl newstack,%esp and whatnot, wouldn't this be a pretty simple solution? > > -Matt > Matthew Dillon > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message