Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Use CPU_COUNT() to update nswtch. No functional ch...



details:   https://anonhg.NetBSD.org/src/rev/6c8b0f0c0050
branches:  trunk
changeset: 847386:6c8b0f0c0050
user:      ad <ad%NetBSD.org@localhost>
date:      Fri Dec 20 21:52:51 2019 +0000

description:
Use CPU_COUNT() to update nswtch.  No functional change.

diffstat:

 sys/kern/kern_synch.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 2c6ec9f19757 -r 6c8b0f0c0050 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c     Fri Dec 20 21:20:09 2019 +0000
+++ b/sys/kern/kern_synch.c     Fri Dec 20 21:52:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_synch.c,v 1.332 2019/12/16 20:59:39 ad Exp $      */
+/*     $NetBSD: kern_synch.c,v 1.333 2019/12/20 21:52:51 ad Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009, 2019
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.332 2019/12/16 20:59:39 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.333 2019/12/20 21:52:51 ad Exp $");
 
 #include "opt_kstack.h"
 #include "opt_dtrace.h"
@@ -677,7 +677,7 @@
                lwp_unlock(l);
 
                /* Count the context switch on this CPU. */
-               ci->ci_data.cpu_nswtch++;
+               CPU_COUNT(CPU_COUNT_NSWTCH, 1);
 
                /* Update status for lwpctl, if present. */
                if (l->l_lwpctl != NULL)
@@ -837,7 +837,7 @@
        spc_unlock(ci);
 
        /* Count the context switch on this CPU. */
-       ci->ci_data.cpu_nswtch++;
+       CPU_COUNT(CPU_COUNT_NSWTCH, 1);
 
        /* Update status for lwpctl, if present. */
        if (l->l_lwpctl != NULL)



Home | Main Index | Thread Index | Old Index