Module Name: src Committed By: riastradh Date: Thu Dec 5 03:21:29 UTC 2019
Modified Files: src/sys/kern: subr_pserialize.c Log Message: Switch psz_ev_excl to static evcnt. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_pserialize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/subr_pserialize.c diff -u src/sys/kern/subr_pserialize.c:1.16 src/sys/kern/subr_pserialize.c:1.17 --- src/sys/kern/subr_pserialize.c:1.16 Thu Dec 5 03:21:17 2019 +++ src/sys/kern/subr_pserialize.c Thu Dec 5 03:21:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $ */ +/* $NetBSD: subr_pserialize.c,v 1.17 2019/12/05 03:21:29 riastradh Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.17 2019/12/05 03:21:29 riastradh Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -47,7 +47,9 @@ struct pserialize { }; static kmutex_t psz_lock __cacheline_aligned; -static struct evcnt psz_ev_excl __cacheline_aligned; +static struct evcnt psz_ev_excl __cacheline_aligned = + EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "pserialize", "exclusive access"); +EVCNT_ATTACH_STATIC(psz_ev_excl); /* * pserialize_init: @@ -59,8 +61,6 @@ pserialize_init(void) { mutex_init(&psz_lock, MUTEX_DEFAULT, IPL_NONE); - evcnt_attach_dynamic(&psz_ev_excl, EVCNT_TYPE_MISC, NULL, - "pserialize", "exclusive access"); } /*