Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern pcu_available_p is only used in KASSERT(), fix non-...
details: https://anonhg.NetBSD.org/src/rev/14c9832db44c
branches: trunk
changeset: 1012687:14c9832db44c
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 07 18:46:00 2020 +0000
description:
pcu_available_p is only used in KASSERT(), fix non-diagnostic build.
diffstat:
sys/kern/subr_pcu.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 0a4bb4d65527 -r 14c9832db44c sys/kern/subr_pcu.c
--- a/sys/kern/subr_pcu.c Fri Aug 07 18:26:33 2020 +0000
+++ b/sys/kern/subr_pcu.c Fri Aug 07 18:46:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pcu.c,v 1.23 2020/08/01 02:05:45 riastradh Exp $ */
+/* $NetBSD: subr_pcu.c,v 1.24 2020/08/07 18:46:00 christos Exp $ */
/*-
* Copyright (c) 2011, 2014 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.23 2020/08/01 02:05:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.24 2020/08/07 18:46:00 christos Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -88,6 +88,7 @@
/* PCU operations structure provided by the MD code. */
extern const pcu_ops_t * const pcu_ops_md_defs[];
+#ifdef DIAGNOSTIC
/*
* pcu_available_p: true if lwp is allowed to use PCU state.
*/
@@ -98,6 +99,7 @@
/* XXX Not sure this is safe unless l is locked! */
return (l->l_flag & (LW_SYSTEM|LW_SYSTEM_FPU)) != LW_SYSTEM;
}
+#endif
/*
* pcu_switchpoint: release PCU state if the LWP is being run on another CPU.
Home |
Main Index |
Thread Index |
Old Index