From owner-freebsd-current Tue Nov 3 06:16:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA13026 for freebsd-current-outgoing; Tue, 3 Nov 1998 06:16:12 -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 GAA13021 for ; Tue, 3 Nov 1998 06:16:10 -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 JAA27776; Tue, 3 Nov 1998 09:15:55 -0500 (EST) Date: Tue, 3 Nov 1998 09:15:55 -0500 (EST) From: Brian Feldman To: Luoqi Chen cc: dot@dotat.at, current@FreeBSD.ORG Subject: Re: Linux clone() In-Reply-To: <199811030332.WAA24322@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 Hmm.. AH! Now we're getting somewhere! I was planning to add that flag mapping before I had a final version of the patch, and still am. Okay, wonderful, I only get a stack pointer... I shouldn't fiddle with p2's eip then, or should I set it to a copyin of the long function pointer from the end of the stack... sorry, I never knew assembly :( 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. > > -lq > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message