From owner-freebsd-hackers Wed Feb 4 14:43:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA29442 for hackers-outgoing; Wed, 4 Feb 1998 14:43:29 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA29347; Wed, 4 Feb 1998 14:42:57 -0800 (PST) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id RAA01489; Wed, 4 Feb 1998 17:42:52 -0500 (EST) (envelope-from toor) Message-Id: <199802042242.RAA01489@dyson.iquest.net> Subject: Re: implementing linux's clone() In-Reply-To: <199802041722.MAA18385@demeter.sunyit.edu> from Alfred Perlstein at "Feb 4, 98 12:18:17 pm" To: perlsta@sunyit.edu (Alfred Perlstein) Date: Wed, 4 Feb 1998 17:42:52 -0500 (EST) Cc: dyson@FreeBSD.ORG, hackers@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" Alfred Perlstein said: > hmmm very interesting, thank you. > > before i cvsup to -current i was wondering if the fuction is "clone-like" > or really just like clone(), will i be disapointed by its functionality > because of what i need from it? > It is still not in it's final form. It is usable, and is being used commercially by my employer though. > > and what do you mean, you have to be careful what you pass it on the stack? > Simply that setting the stack is tricky, since it isn't done in the kernel. Using the memory sharing capability with RFMEM is tricky because of the stack issues. > > that doesn't mean you can crash BSD with an innapropriate call does it? > No. > > just that if you give bad args your program will segfault or something? > It means that my rf.S example code is the way to set the stack. > > also, if i modded the below asm stuff not to __exit after return would that > "work" or is there something i'm not seeing? > I am not sure. > > and what is the "arg" > parameter, a pointer to the thread function's arguments? > Yes. I haven't documented things in detail, because frankly, other things have gotten in the way of our pthreads stuff, and I have held-up someone else who has been working on a real pthreads capability. -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig.