From fbaadda60b68cbdf776bfc0200def25c6a9a799f Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 14 May 2014 09:03:02 +0000 Subject: [PATCH] Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU. Suggested by: rwatson@ MFC after: 1 month Sponsored by: The FreeBSD Foundation --- sys/kern/kern_loginclass.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/kern/kern_loginclass.c b/sys/kern/kern_loginclass.c index beac93b21277..b20f60bdf2d7 100644 --- a/sys/kern/kern_loginclass.c +++ b/sys/kern/kern_loginclass.c @@ -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)(struct racct *racct, (callback)(lc->lc_racct, arg2, arg3); mtx_unlock(&loginclasses_lock); } - -static void -lc_init(void) -{ - - mtx_init(&loginclasses_lock, "loginclasses lock", NULL, MTX_DEF); -}