From owner-freebsd-hackers Sun Mar 4 10: 1:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id EAFDD37B71A for ; Sun, 4 Mar 2001 10:01:25 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f24I13P24924; Sun, 4 Mar 2001 10:01:03 -0800 (PST) Date: Sun, 4 Mar 2001 10:01:03 -0800 From: Alfred Perlstein To: "Alexander N. Kabaev" Cc: Jordan DeLong , freebsd-hackers@FreeBSD.ORG Subject: Re: FreeBSD pthreads Message-ID: <20010304100102.O8663@fw.wintelcom.net> References: <20010304101847.A8709@cx420564-b.tucson1.az.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from kabaev@mail.ru on Sun, Mar 04, 2001 at 12:56:51PM -0500 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Alexander N. Kabaev [010304 09:58] wrote: > > On 04-Mar-2001 Jordan DeLong wrote: > > Hey; I've got a question about the pthread implementation on freebsd. I was > > looking it over and noticed that the pthread library is green; which is > > disadvantagous on SMP machines. I found a port of the linux pthreads, but it > > uses rfork() to create the new threads... > > Why do you think that clone syscall on Linux is any different than rfork with > appropriate parameters on FreeBSD? > > > Anyway; I was curious if a clone() call is in the works for freebsd 5.0? And > > if not, is there much interest in getting one at some point, or are there > > other > > factors that'd make implemention of one right now more difficult than it > > would > > seem? > > > > -Jordan > > There is nothing clone syscall can offer which cannot be done with rfork, so > implementing it would be a waste of time, IMHO. Actually, clone() returns to your program with the stack fixed up so that you don't crash immediately, FreeBSD has a way of doing this, it's documented in the manpages and through disucssion on the mailing lists. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message