From owner-p4-projects@FreeBSD.ORG Fri Aug 7 17:01:40 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F3F41065686; Fri, 7 Aug 2009 17:01:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E5F0106568B for ; Fri, 7 Aug 2009 17:01:40 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4DEA08FC25 for ; Fri, 7 Aug 2009 17:01:40 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n77H1efJ061143 for ; Fri, 7 Aug 2009 17:01:40 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n77H1eew061141 for perforce@freebsd.org; Fri, 7 Aug 2009 17:01:40 GMT (envelope-from julian@freebsd.org) Date: Fri, 7 Aug 2009 17:01:40 GMT Message-Id: <200908071701.n77H1eew061141@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 167091 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 17:01:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=167091 Change 167091 by julian@julian-mac on 2009/08/07 17:01:05 Describe the init/teardown a bit more. Affected files ... .. //depot/projects/vimage/porting_to_vimage.txt#13 edit Differences ... ==== //depot/projects/vimage/porting_to_vimage.txt#13 (text+ko) ==== @@ -154,7 +154,19 @@ required for the module to stash away the virtual environment instance somewhere, and make associated changes in the code. -5/ Add the code described below to the files that make up the module +5/ Decide which parts of the initialization and teardown are per jail and + which parts are global, and separate out the code accordingly. + Global initialization is done using the SYSINIT facility. + Per jail initialization is done using VNET_SYSINIT(). + Per jail teardown is doen using VNET_SYSUNINIT(). + Global teardown is done using SYSUNIT(). + In addition, the modevent handler is called with various event types before + any of these are called. The modevent handler may veto load or teardown. + On Shutdown, only the modevent handler is called so it may have to simulate + the calling of the other handlers if clean shutdown is a requirement + of your module. (see sample code below). + +6/ Add the code described below to the files that make up the module Details: (VNET implementation details)