Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.
Suggested by: rwatson@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a3837e481c
commit
fbaadda60b
@ -69,9 +69,7 @@ LIST_HEAD(, loginclass) loginclasses;
|
|||||||
* Lock protecting loginclasses list.
|
* Lock protecting loginclasses list.
|
||||||
*/
|
*/
|
||||||
static struct mtx loginclasses_lock;
|
static struct mtx loginclasses_lock;
|
||||||
|
MTX_SYSINIT(loginclasses_init, &loginclasses_lock, "loginclasses lock", MTX_DEF);
|
||||||
static void lc_init(void);
|
|
||||||
SYSINIT(loginclass, SI_SUB_CPU, SI_ORDER_FIRST, lc_init, NULL);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
loginclass_hold(struct loginclass *lc)
|
loginclass_hold(struct loginclass *lc)
|
||||||
@ -229,10 +227,3 @@ loginclass_racct_foreach(void (*callback)(struct racct *racct,
|
|||||||
(callback)(lc->lc_racct, arg2, arg3);
|
(callback)(lc->lc_racct, arg2, arg3);
|
||||||
mtx_unlock(&loginclasses_lock);
|
mtx_unlock(&loginclasses_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
lc_init(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
mtx_init(&loginclasses_lock, "loginclasses lock", NULL, MTX_DEF);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user