PERFORCE change 37404 for review
Sam Leffler
sam at FreeBSD.org
Tue Sep 2 16:26:06 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=37404
Change 37404 by sam at sam_ebb on 2003/09/02 16:25:51
try integrating again
Affected files ...
.. //depot/projects/netperf/sys/kern/uipc_domain.c#4 edit
Differences ...
==== //depot/projects/netperf/sys/kern/uipc_domain.c#4 (text+ko) ====
@@ -96,7 +96,7 @@
/*
* update global information about maximums
*/
- max_hdr = max_linkhdr + max_protohdr; /** XXX locking */
+ max_hdr = max_linkhdr + max_protohdr;
max_datalen = MHLEN - max_hdr;
}
@@ -131,8 +131,6 @@
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(socket_zone, maxsockets);
- mtx_init(&dom_mtx, "domain list lock", NULL, MTX_DEF);
-
if (max_linkhdr < 16) /* XXX */
max_linkhdr = 16;
@@ -152,14 +150,11 @@
register struct domain *dp;
register struct protosw *pr;
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next)
if (dp->dom_family == family)
goto found;
- DOMAIN_UNLOCK();
return (0);
found:
- DOMAIN_UNLOCK();
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_type && pr->pr_type == type)
return (pr);
@@ -178,14 +173,11 @@
if (family == 0)
return (0);
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next)
if (dp->dom_family == family)
goto found;
- DOMAIN_UNLOCK();
return (0);
found:
- DOMAIN_UNLOCK();
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) {
if ((pr->pr_protocol == protocol) && (pr->pr_type == type))
return (pr);
@@ -205,12 +197,10 @@
register struct domain *dp;
register struct protosw *pr;
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next)
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_ctlinput)
(*pr->pr_ctlinput)(cmd, sa, (void *)0);
- DOMAIN_UNLOCK();
}
void
@@ -224,7 +214,6 @@
if (!sa)
return;
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next) {
/*
* the check must be made by xx_ctlinput() anyways, to
@@ -238,7 +227,6 @@
if (pr->pr_ctlinput)
(*pr->pr_ctlinput)(cmd, sa, ctlparam);
}
- DOMAIN_UNLOCK();
}
static void
@@ -248,13 +236,10 @@
register struct domain *dp;
register struct protosw *pr;
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next)
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_slowtimo)
(*pr->pr_slowtimo)();
- DOMAIN_UNLOCK();
-
callout_reset(&pfslow_callout, hz/2, pfslowtimo, NULL);
}
@@ -265,12 +250,9 @@
register struct domain *dp;
register struct protosw *pr;
- DOMAIN_LOCK();
for (dp = domains; dp; dp = dp->dom_next)
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_fasttimo)
(*pr->pr_fasttimo)();
- DOMAIN_UNLOCK();
-
callout_reset(&pffast_callout, hz/5, pffasttimo, NULL);
}
More information about the p4-projects
mailing list