From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HRqxZ-0000Wg-32 for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Mar 2007 07:29:41 -0700 Received: from mail119.messagelabs.com ([216.82.241.179]) by mail.sourceforge.net with smtp (Exim 4.44) id 1HRqxX-0004e6-Kx for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Mar 2007 07:29:41 -0700 Received: from il06exr03.mot.com (il06exr03.mot.com [129.188.137.133]) by motgate8.mot.com (8.12.11/Motorola) with ESMTP id l2FETVeZ013063 for ; Thu, 15 Mar 2007 07:29:31 -0700 (MST) Received: from ZMY16EXM67.ds.mot.com (zmy16exm67.ap.mot.com [10.179.4.27]) by il06exr03.mot.com (8.13.1/8.13.0) with ESMTP id l2FETUZ8013405 for ; Thu, 15 Mar 2007 09:29:31 -0500 (CDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 15 Mar 2007 22:29:28 +0800 Message-ID: <0A01463223B8164194908CAC85B66A1201A9750B@ZMY16EXM67.ds.mot.com> From: "Krishnappa Abhijith-A21204" Subject: [uml-devel] Regarding fork() implementation in UML List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1484365919==" Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: user-mode-linux-devel@lists.sourceforge.net This is a multi-part message in MIME format. --===============1484365919== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7670E.56C6EADD" This is a multi-part message in MIME format. ------_=_NextPart_001_01C7670E.56C6EADD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, SORRY for bugging you guys so much... Regarding fork() implementation in UML =20 I was going through the below code=20 =20 long sys_fork(void) { long ret; =20 current->thread.forking =3D 1; ret =3D do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), ¤t->thread.regs, 0, NULL, NULL); current->thread.forking =3D 0; return(ret); } =20 Can pls let me know why current->thread.forking =3D 1 was done before calling do_fork() and then reset after that ? =20 Regards, Abhi ------_=_NextPart_001_01C7670E.56C6EADD Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi,
       &nbs= p;   =20 SORRY for bugging you guys so much...
 Regarding fork() implementation in=20 UML
 
I was going through the below code =
 
long sys_fork(void)
{
 long=20 ret;
 
 current->thread.forking =3D=20 1;
 ret =3D do_fork(SIGCHLD,=20 UPT_SP(&current->thread.regs.regs),
    &nb= sp;  =20 &current->thread.regs, 0, NULL,=20 NULL);
 current->thread.forking =3D=20 0;
 return(ret);
}
 
Can pls let me know why = current->thread.forking =3D 1=20 was done before calling do_fork() and then reset after that=20 ?
 
Regards,
Abhi

------_=_NextPart_001_01C7670E.56C6EADD-- --===============1484365919== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============1484365919== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel --===============1484365919==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HS2DC-0001yF-O1 for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Mar 2007 19:30:38 -0700 Received: from [198.99.130.12] (helo=saraswathi.solana.com) by mail.sourceforge.net with esmtp (Exim 4.44) id 1HS2DA-0007pQ-Qf for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Mar 2007 19:30:34 -0700 Date: Thu, 15 Mar 2007 22:29:14 -0400 From: Jeff Dike Message-ID: <20070316022914.GA8635@c2.user-mode-linux.org> References: <0A01463223B8164194908CAC85B66A1201A9750B@ZMY16EXM67.ds.mot.com> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <0A01463223B8164194908CAC85B66A1201A9750B@ZMY16EXM67.ds.mot.com> Subject: Re: [uml-devel] Regarding fork() implementation in UML List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: Krishnappa Abhijith-A21204 Cc: user-mode-linux-devel@lists.sourceforge.net On Thu, Mar 15, 2007 at 10:29:28PM +0800, Krishnappa Abhijith-A21204 wrote: > Can pls let me know why current->thread.forking = 1 was done before > calling do_fork() and then reset after that ? If you look at copy_thread, you will see that there is different treatment for kernel threads and processes, and thread.forking is used to distinguish between them. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel