Date: Fri, 30 Sep 2005 12:58:37 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 84543 for review Message-ID: <200509301258.j8UCwbwn047934@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=84543 Change 84543 by jhb@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); }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509301258.j8UCwbwn047934>
