FreeBSD Bugzilla – Attachment 94678 Details for
Bug 132884
[request] No manpage for SYSINIT and SYSUNINIT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
SYSINIT.9.txt
SYSINIT.9.txt (text/plain; charset=US-ASCII), 3.68 KB, created by
pluknet
on 2010-12-01 17:56:37 UTC
(
hide
)
Description:
SYSINIT.9.txt
Filename:
MIME Type:
Creator:
pluknet
Created:
2010-12-01 17:56:37 UTC
Size:
3.68 KB
patch
obsolete
>.\" Copyright (c) 2003 Hiten M. Pandya >.\" All rights reserved. >.\" >.\" Redistribution and use in source and binary forms, with or without >.\" modification, are permitted provided that the following conditions >.\" are met: >.\" 1. Redistributions of source code must retain the above copyright >.\" notice, this list of conditions and the following disclaimer. >.\" 2. Redistributions in binary form must reproduce the above copyright >.\" notice, this list of conditions and the following disclaimer in the >.\" documentation and/or other materials provided with the distribution. >.\" >.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >.\" SUCH DAMAGE. >.\" >.\" $FreeBSD$ >.\" >.Dd December 1, 2010 >.Dt SYSINIT 9 >.Os >.Sh NAME >.Nm SYSINIT , >.Nm SYSUNINIT >.Nd a framework for dynamic kernel initialization >.Sh SYNOPSIS >.In sys/param.h >.In sys/kernel.h >.Fn SYSINIT "uniquifier" "enum sysinit_sub_id subsystem" "enum sysinit_elem_order order" "sysinit_cfunc_t func" "const void *ident" >.Fn SYSUNINIT "uniquifier" "enum sysinit_sub_id subsystem" "enum sysinit_elem_order order" "sysinit_cfunc_t func" "const void *ident" >.Sh DESCRIPTION >.Nm >is a mechanism which is used in the dynamic initialization of the kernel. >It allows reordering of subsystems and to seperately compile, link and >initialize kernel modules (KLDs). >.Pp >The >.Fn SYSINIT >macro creates the necessary data in >.Nm >startup data set >.Vt struct sysinit >to sort and dispatch a function at system >startup and module load, as defined by >.In sys/kernel.h : >.Bd -literal >struct sysinit { > enum sysinit_sub_id subsystem; /* subsystem identifier*/ > enum sysinit_elem_order order; /* init order within subsystem*/ > sysinit_cfunc_t func; /* function */ > const void *udata; /* multiplexer/argument */ >}; >.Ed >.Pp >The >.Fn SYSINIT >macro takes a >.Pa uniquifier >argument to identify the particular function dispatch data, >the >.Pa subsystem >type of startup interface, the subsystem element >.Pa order >of initialization within the subsystem, the >.Pa func >function to call, >and the data specified in >.Pa ident >argument to pass the function. >.Pp >The >.Fn SYSUNINIT >macro behaves similarly to the >.Fn SYSINIT >macro except that it adds the data to corresponding shutdown data set. >.Sh EXAMPLES >This example shows a SYSINIT that needs to be run just barely before >the SYSINIT's that handle tuning kernel parameters: >.Bd -literal -offset indent >static void >mptable_register(void *dummy __unused) >{ > > apic_register_enumerator(&mptable_enumerator); >} >SYSINIT(mptable_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST, > mptable_register, NULL); >.Ed >.Sh DIAGNOSTICS >Behaviour is undefined if invalid arguments are passed to the above >macros. >.Sh SEE ALSO >.Xr kld 4 , >.Xr DECLARE_MODULE 9 , >.Xr DEV_MODULE 9 , >.Xr DRIVER_MODULE 9 , >.Xr MTX_SYSINIT 9 , >.Xr SYSCALL_MODULE 9 >.Sh HISTORY >The >.Nm >framework first appeared in >.Fx 2.2 . >.Sh AUTHORS >.An -nosplit >The >.Nm >framework was written by >.An Terrence Lambert Aq terry@FreeBSD.org . >.Pp >This manual page was written by >.An Hiten Pandya Aq hmp@FreeBSD.org .
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 132884
: 94678