pcu_available_p is only used in KASSERT(), fix non-diagnostic build.

This commit is contained in:
christos 2020-08-07 18:46:00 +00:00
parent dc4dbbe4f6
commit 043adc738f
1 changed files with 4 additions and 2 deletions

View File

@ -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.