Module Name: src Committed By: ad Date: Sat Nov 30 17:45:54 UTC 2019
Modified Files: src/sys/sys: lwp.h Log Message: Mark the context switch counters volatile (because preemption). To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.190 src/sys/sys/lwp.h:1.191 --- src/sys/sys/lwp.h:1.190 Sat Nov 23 19:42:52 2019 +++ src/sys/sys/lwp.h Sat Nov 30 17:45:54 2019 @@ -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 */