From owner-freebsd-hackers Mon Jun 28 9:39:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id D75BB14E12 for ; Mon, 28 Jun 1999 09:39:41 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 221D483; Tue, 29 Jun 1999 00:39:41 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Warner Losh Cc: "Daniel J. O'Connor" , hackers@FreeBSD.ORG Subject: Re: "restricted" kernel threads implementation from NetBSD via n In-reply-to: Your message of "Mon, 28 Jun 1999 08:26:02 CST." <199906281426.IAA15234@harmony.village.org> Date: Tue, 29 Jun 1999 00:39:41 +0800 From: Peter Wemm Message-Id: <19990628163941.221D483@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > In message "Daniel J. O'Connor" writ es: > : I don't suppose someone could post an explanation of how kernel threads wor k > : could they? :) > > Looks like it just does a fork like thing so it can do context > switches... > > Warner When I looked last time, it was effectively a callable interface to what we do from SYSINIT_KT(), ie: fork proc0, which runs in kernel space with it's own stack etc. kthread_create_deferred() is not really anything to do with those sort of threads. It's just a generic callback registration system that happens to be called after the basic processes have started so that proc0,1,2 etc are not disturbed. It's similar to the config_intrhook() stuff but is run later. You can probably cut/paste our SYSINIT_KT() code into some compatable function interfaces pretty easily to avoid yet another new file. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message