From owner-freebsd-current Tue Nov 3 06:23:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA13840 for freebsd-current-outgoing; Tue, 3 Nov 1998 06:23:35 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from zone.syracuse.net (zone.syracuse.net [205.232.47.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA13835 for ; Tue, 3 Nov 1998 06:23:33 -0800 (PST) (envelope-from green@zone.syracuse.net) Received: from localhost (green@localhost) by zone.syracuse.net (8.8.8/8.8.7) with ESMTP id JAA27875; Tue, 3 Nov 1998 09:23:18 -0500 (EST) Date: Tue, 3 Nov 1998 09:23:18 -0500 (EST) From: Brian Feldman To: Luoqi Chen cc: dot@dotat.at, current@FreeBSD.ORG Subject: Re: Linux clone() In-Reply-To: <199811030359.WAA24618@lor.watermarkgroup.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 I'll be able to handle all this, don't worry :) Right now I'm just figureing out how to pop the stuff off, if I should... I'll know in a few ins. Brian Feldman On Mon, 2 Nov 1998, Luoqi Chen wrote: > > > Hmmm.. okay this would be a good test. Right now I'm going thru the > > > various linuxthreads example programs.... The patch seems to be doing > > > something wrong, and I'm unable to figure out what to do, due to Linux's > > > humongously gross syscall system (so the kernel doesn't help me). It also > > > seems now I was implementing a LIBRARY function, which is just a wrapper. > > > If I could get my hands on what the real system calls' args are it would > > > be great. > > > > > > Brian Feldman > > > > > It seems that clone() the syscall takes two arguments: > > struct linux_clone_args { > > int flags; > > void *stack; > > }; > > the wrapper in library takes care of pushing the function address and its > > argument on to the stack. You probably also want to map linux clone flags > > to that of rfork's: CLONE_FILES -> RFFDG, CLONE_VM -> RFMEM. > I made a mistake, it should be !CLONE_FILES -> RFFDG. And there's no rfork() > counterpart for CLONE_SIGHAND, default rfork behavior corresponds to > !CLONE_SIGHAND. > > -lq > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message