Module Name: src Committed By: christos Date: Fri Aug 7 18:46:00 UTC 2020
Modified Files: src/sys/kern: subr_pcu.c Log Message: pcu_available_p is only used in KASSERT(), fix non-diagnostic build. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/kern/subr_pcu.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_pcu.c diff -u src/sys/kern/subr_pcu.c:1.23 src/sys/kern/subr_pcu.c:1.24 --- src/sys/kern/subr_pcu.c:1.23 Fri Jul 31 22:05:45 2020 +++ src/sys/kern/subr_pcu.c Fri Aug 7 14:46:00 2020 @@ -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 @@ typedef struct { /* 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 @@ pcu_available_p(struct lwp *l) /* 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.