summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2019-11-30 17:45:54 +0000
committerad <ad@NetBSD.org>2019-11-30 17:45:54 +0000
commit13df34491c2e32fba811a50df4d10be12e2ee180 (patch)
tree636a3d2cbc9a5c6ce36e864bddc83d7fe457619d /sys
parent4e8cd322f9559649cd40c1c5bab8a2143aa66a6a (diff)
Mark the context switch counters volatile (because preemption).
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/lwp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/lwp.h b/sys/sys/lwp.h
index 4c2b22741fe..496278ed3ab 100644
--- a/sys/sys/lwp.h
+++ b/sys/sys/lwp.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.190 2019/11/23 19:42:52 ad Exp $ */
+/* $NetBSD: lwp.h,v 1.191 2019/11/30 17:45:54 ad Exp $ */
/*
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019
@@ -112,8 +112,8 @@ struct lwp {
pri_t l_auxprio; /* l: max(inherit,protect) priority */
int l_protectdepth; /* l: for PTHREAD_PRIO_PROTECT */
SLIST_HEAD(, turnstile) l_pi_lenders; /* l: ts lending us priority */
- uint64_t l_ncsw; /* l: total context switches */
- uint64_t l_nivcsw; /* l: involuntary context switches */
+ volatile uint64_t l_ncsw; /* l: total context switches */
+ volatile uint64_t l_nivcsw; /* l: involuntary context switches */
u_int l_cpticks; /* (: Ticks of CPU time */
fixpt_t l_pctcpu; /* p: %cpu during l_swtime */
fixpt_t l_estcpu; /* l: cpu time for SCHED_4BSD */