diff options
-rw-r--r-- | sys/arch/amd64/amd64/proc_machdep.c | 2 | ||||
-rw-r--r-- | sys/include/sys/sched.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/proc_machdep.c b/sys/arch/amd64/amd64/proc_machdep.c index ad807fe..a1d6563 100644 --- a/sys/arch/amd64/amd64/proc_machdep.c +++ b/sys/arch/amd64/amd64/proc_machdep.c @@ -256,7 +256,7 @@ sched_switch_to(struct trapframe *tf, struct proc *td) /* Update stats */ cpustat = &ci->stat; - cpustat->nswitch++; + atomic_inc_64(&cpustat->nswitch); ci->curtd = td; pcbp = &td->pcb; diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h index 19ceb7e..8b0ba02 100644 --- a/sys/include/sys/sched.h +++ b/sys/include/sys/sched.h @@ -42,7 +42,7 @@ * @idle: Number of milliseconds idle */ struct sched_cpu { - uint32_t nswitch; + uint64_t nswitch; }; /* |