Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Aug 2009 17:01:40 GMT
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 167091 for review
Message-ID:  <200908071701.n77H1eew061141@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908071701.n77H1eew061141>