X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/d0d50a8673c5141ac53caf5ef01491e0d4b27900..620b32904718b0941fb8b24e31e4c49188f825c1:/usr/src/sys/kern/uipc_domain.c diff --git a/usr/src/sys/kern/uipc_domain.c b/usr/src/sys/kern/uipc_domain.c index ffca28c56b..ccc213d657 100644 --- a/usr/src/sys/kern/uipc_domain.c +++ b/usr/src/sys/kern/uipc_domain.c @@ -1,9 +1,11 @@ -/* uipc_domain.c 5.5 82/11/02 */ +/* uipc_domain.c 5.7 82/12/30 */ #include "../h/param.h" #include "../h/socket.h" #include "../h/protosw.h" #include "../h/domain.h" +#include +#include "../h/kernel.h" #define ADDDOMAIN(x) { \ extern struct domain x/**/domain; \ @@ -13,7 +15,10 @@ domaininit() { + register struct domain *dp; + register struct protosw *pr; +#ifndef lint ADDDOMAIN(unix); #ifdef INET ADDDOMAIN(inet); @@ -21,25 +26,18 @@ domaininit() #ifdef PUP ADDDOMAIN(pup); #endif -#ifdef IMP +#include "imp.h" +#if NIMP > 0 ADDDOMAIN(imp); #endif - pfinit(); -} - -/* - * Operations applying to the sets of protocols - * defined by the available communications domains. - */ -pfinit() -{ - register struct domain *dp; - register struct protosw *pr; +#endif for (dp = domains; dp; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_init) (*pr->pr_init)(); + pffasttimo(); + pfslowtimo(); } struct protosw * @@ -74,7 +72,7 @@ pffindproto(family, protocol) goto found; return (0); found: - for (pr = dp->dom_protosw; pr <= dp->dom_protoswNPROTOSW; pr++) + for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_protocol == protocol) return (pr); return (0); @@ -102,6 +100,7 @@ pfslowtimo() for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_slowtimo) (*pr->pr_slowtimo)(); + timeout(pfslowtimo, (caddr_t)0, hz/2); } pffasttimo() @@ -113,4 +112,5 @@ pffasttimo() for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_fasttimo) (*pr->pr_fasttimo)(); + timeout(pffasttimo, (caddr_t)0, hz/5); }