From owner-freebsd-current Mon Nov 2 19:59:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA02866 for freebsd-current-outgoing; Mon, 2 Nov 1998 19:59:32 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA02861 for ; Mon, 2 Nov 1998 19:59:30 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id WAA24618; Mon, 2 Nov 1998 22:59:24 -0500 (EST) (envelope-from luoqi) Date: Mon, 2 Nov 1998 22:59:24 -0500 (EST) From: Luoqi Chen Message-Id: <199811030359.WAA24618@lor.watermarkgroup.com> To: dot@dotat.at, green@zone.syracuse.net Subject: Re: Linux clone() Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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