PERFORCE change 37401 for review

Sam Leffler sam at FreeBSD.org
Tue Sep 2 14:46:39 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=37401

Change 37401 by sam at sam_ebb on 2003/09/02 14:46:12

	IFC

Affected files ...

.. //depot/projects/netperf/sys/kern/uipc_domain.c#3 integrate

Differences ...

==== //depot/projects/netperf/sys/kern/uipc_domain.c#3 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.32 2003/06/11 00:56:58 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_domain.c,v 1.34 2003/09/02 20:59:23 sam Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -71,6 +71,7 @@
 
 struct domain *domains;		/* registered protocol domains */
 struct mtx dom_mtx;		/* domain list lock */
+MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF);
 
 /*
  * Add a new protocol domain to the list of supported domains
@@ -80,7 +81,7 @@
 static void
 net_init_domain(struct domain *dp)
 {
-	register struct protosw *pr;
+	struct protosw *pr;
 
 	if (dp->dom_init)
 		(*dp->dom_init)();
@@ -110,10 +111,10 @@
 	struct domain *dp;
 
 	dp = (struct domain *)data;
-	DOMAIN_LOCK();
+	mtx_lock(&dom_mtx);
 	dp->dom_next = domains;
 	domains = dp;
-	DOMAIN_UNLOCK();
+	mtx_unlock(&dom_mtx);
 	net_init_domain(dp);
 }
 


More information about the p4-projects mailing list