Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2014 09:03:03 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266007 - head/sys/kern
Message-ID:  <201405140903.s4E933lB020287@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed May 14 09:03:02 2014
New Revision: 266007
URL: http://svnweb.freebsd.org/changeset/base/266007

Log:
  Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.
  
  Suggested by:	rwatson@
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/kern/kern_loginclass.c

Modified: head/sys/kern/kern_loginclass.c
==============================================================================
--- head/sys/kern/kern_loginclass.c	Wed May 14 07:33:06 2014	(r266006)
+++ head/sys/kern/kern_loginclass.c	Wed May 14 09:03:02 2014	(r266007)
@@ -69,9 +69,7 @@ LIST_HEAD(, loginclass)	loginclasses;
  * Lock protecting loginclasses list.
  */
 static struct mtx loginclasses_lock;
-
-static void lc_init(void);
-SYSINIT(loginclass, SI_SUB_CPU, SI_ORDER_FIRST, lc_init, NULL);
+MTX_SYSINIT(loginclasses_init, &loginclasses_lock, "loginclasses lock", MTX_DEF);
 
 void
 loginclass_hold(struct loginclass *lc)
@@ -229,10 +227,3 @@ loginclass_racct_foreach(void (*callback
 		(callback)(lc->lc_racct, arg2, arg3);
 	mtx_unlock(&loginclasses_lock);
 }
-
-static void
-lc_init(void)
-{
-
-	mtx_init(&loginclasses_lock, "loginclasses lock", NULL, MTX_DEF);
-}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405140903.s4E933lB020287>