From owner-svn-src-head@FreeBSD.ORG Wed May 14 09:03:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA92D188; Wed, 14 May 2014 09:03:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7FC22A7D; Wed, 14 May 2014 09:03:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4E933DQ020288; Wed, 14 May 2014 09:03:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4E933lB020287; Wed, 14 May 2014 09:03:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405140903.s4E933lB020287@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 14 May 2014 09:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266007 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 09:03:03 -0000 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); -}