Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Initialize ex_lock and ex_cv only in the not-EX_EAR...
details: https://anonhg.NetBSD.org/src/rev/a6fcd4c19664
branches: trunk
changeset: 356334:a6fcd4c19664
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Sep 18 13:22:56 2017 +0000
description:
Initialize ex_lock and ex_cv only in the not-EX_EARLY case.
diffstat:
sys/kern/subr_extent.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r e62fd7968344 -r a6fcd4c19664 sys/kern/subr_extent.c
--- a/sys/kern/subr_extent.c Mon Sep 18 10:18:13 2017 +0000
+++ b/sys/kern/subr_extent.c Mon Sep 18 13:22:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_extent.c,v 1.84 2017/08/24 17:18:55 kre Exp $ */
+/* $NetBSD: subr_extent.c,v 1.85 2017/09/18 13:22:56 jakllsch Exp $ */
/*-
* Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.84 2017/08/24 17:18:55 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.85 2017/09/18 13:22:56 jakllsch Exp $");
#ifdef _KERNEL
#ifdef _KERNEL_OPT
@@ -295,8 +295,10 @@
}
/* Fill in the extent descriptor and return it to the caller. */
- mutex_init(&ex->ex_lock, MUTEX_DEFAULT, IPL_VM);
- cv_init(&ex->ex_cv, "extent");
+ if ((flags & EX_EARLY) == 0) {
+ mutex_init(&ex->ex_lock, MUTEX_DEFAULT, IPL_VM);
+ cv_init(&ex->ex_cv, "extent");
+ }
LIST_INIT(&ex->ex_regions);
ex->ex_name = name;
ex->ex_start = start;
Home |
Main Index |
Thread Index |
Old Index