PERFORCE change 84543 for review
John Baldwin
jhb at FreeBSD.org
Fri Sep 30 05:58:39 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=84543
Change 84543 by jhb at jhb_slimer on 2005/09/30 12:57:36
Initialize mutex backing dev_lock in mutex_init() to cut down on
the overhead in dev_lock().
Affected files ...
.. //depot/projects/smpng/sys/kern/kern_conf.c#43 edit
.. //depot/projects/smpng/sys/kern/kern_mutex.c#105 edit
Differences ...
==== //depot/projects/smpng/sys/kern/kern_conf.c#43 (text+ko) ====
@@ -57,8 +57,7 @@
void
dev_lock(void)
{
- if (!mtx_initialized(&devmtx))
- mtx_init(&devmtx, "cdev", NULL, MTX_DEF);
+
mtx_lock(&devmtx);
}
==== //depot/projects/smpng/sys/kern/kern_mutex.c#105 (text+ko) ====
@@ -935,5 +935,6 @@
mtx_init(&Giant, "Giant", NULL, MTX_DEF | MTX_RECURSE);
mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN | MTX_RECURSE);
mtx_init(&proc0.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
+ mtx_init(&devmtx, "cdev", NULL, MTX_DEF);
mtx_lock(&Giant);
}
More information about the p4-projects
mailing list