diff options
author | julian <julian@FreeBSD.org> | 1995-08-28 09:19:25 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-08-28 09:19:25 +0000 |
commit | ebb726ec45c12268b6b931aa636809cc9cb99a90 (patch) | |
tree | 53b6da073fd58ab81ebf18bb0642954c76b642bd /sys/kern/uipc_domain.c | |
parent | 6f51a7615899188fd49e4446341be92684c778de (diff) | |
download | FreeBSD-src-ebb726ec45c12268b6b931aa636809cc9cb99a90.zip FreeBSD-src-ebb726ec45c12268b6b931aa636809cc9cb99a90.tar.gz |
Reviewed by: julian with quick glances by bruce and others
Submitted by: terry (terry lambert)
This is a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..
NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..
certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)
The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
Diffstat (limited to 'sys/kern/uipc_domain.c')
-rw-r--r-- | sys/kern/uipc_domain.c | 60 |
1 files changed, 57 insertions, 3 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 6332c07..7eea042 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93 - * $Id: uipc_domain.c,v 1.6 1995/05/11 00:16:44 wollman Exp $ + * $Id: uipc_domain.c,v 1.7 1995/08/16 16:13:21 bde Exp $ */ #include <sys/param.h> @@ -46,6 +46,29 @@ #include <vm/vm.h> #include <sys/sysctl.h> +/* + * System initialization + * + * Note: domain initialization wants to take place on a per domain basis + * as a result of traversing a linker set. Most likely, each domain + * want to call a registration function rather than being handled here + * in domaininit(). Probably this will look like: + * + * SYSINIT(unique, SI_SUB_PROTO_DOMAI, SI_ORDER_ANY, domain_add, (caddr_t)xxx) + * + * Where 'xxx' is replaced by the address of a parameter struct to be + * passed to the doamin_add() function. + */ + +static int x_save_spl; /* used by kludge*/ +static void kludge_splimp __P((caddr_t)); +static void kludge_splx __P((caddr_t)); +static void domaininit __P((caddr_t)); +SYSINIT(splimp, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, kludge_splimp, (caddr_t)&x_save_spl) +SYSINIT(domain, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, domaininit, NULL) +SYSINIT(splx, SI_SUB_PROTO_END, SI_ORDER_FIRST, kludge_splx, (caddr_t)&x_save_spl) + + void pffasttimo __P((void *)); void pfslowtimo __P((void *)); @@ -58,8 +81,10 @@ struct domain *domains; extern struct linker_set domain_set; -void -domaininit() +/* ARGSUSED*/ +static void +domaininit( udata) +caddr_t udata; /* not used*/ { register struct domain *dp, **dpp; register struct protosw *pr; @@ -96,6 +121,35 @@ domaininit() timeout(pfslowtimo, (void *)0, 1); } + +/* + * The following two operations are kludge code. Most likely, they should + * be done as a "domainpreinit()" for the first function and then rolled + * in as the last act of "domaininit()" for the second. + * + * In point of fact, it is questionable why other initialization prior + * to this does not also take place at splimp by default. + */ +static void +kludge_splimp( udata) +caddr_t udata; +{ + int *savesplp = (int *)udata; + + *savesplp = splimp(); +} + +static void +kludge_splx( udata) +caddr_t udata; +{ + int *savesplp = (int *)udata; + + splx( *savesplp); +} + + + struct protosw * pffindtype(family, type) int family, type; |