From owner-cvs-all Fri May 3 7:46:34 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.iinet.net.au (symphony-03.iinet.net.au [203.59.3.35]) by hub.freebsd.org (Postfix) with SMTP id 0765C37B41D for ; Fri, 3 May 2002 07:46:23 -0700 (PDT) Received: (qmail 32103 invoked by uid 666); 3 May 2002 14:46:20 -0000 Received: from unknown (HELO elischer.org) (203.59.112.110) by mail.iinet.net.au with SMTP; 3 May 2002 14:46:20 -0000 Message-ID: <3CD2A2A5.11F68277@elischer.org> Date: Fri, 03 May 2002 07:46:01 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: John Baldwin Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c References: Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Baldwin wrote: > > > - Document a really weird race that will come up with KSE allows multiple > > kernel threads per process. > > s/with/when/ I checked out your comment.... This race is already taken care of in the KSE branch. Both exit and fork (and exec) have 'single-threading' funnels, that ensure that they are the only thread running before permitting the active thread to progress further into the given function. They know about each other to some extent and there is a priority in that if one thread enters exit() and another enters fork() a moment later, that doing the fork will suicide, and that entering exit() will only be allowed to continue when all other threads have done themselves in. In the case where the fork() is fractionally ahead, the exiting thread will suspend until the fork has completed. There's more to than that of course but that's the gist of it. -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message