From b4b70819619b531a5683c678974a7b18e8b09937 Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Mon, 4 Jun 2007 21:45:18 +0000 Subject: Do proper "locking" for missing vmmeters part. Now, we assume no more sched_lock protection for some of them and use the distribuited loads method for vmmeter (distribuited through CPUs). Reviewed by: alc, bde Approved by: jeff (mentor) --- sys/kern/kern_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/kern_thread.c') diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index dcb00b770954..12a077c4315e 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -405,7 +405,7 @@ thread_exit(void) p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); PCPU_SET(switchtime, new_switchtime); PCPU_SET(switchticks, ticks); - cnt.v_swtch++; + PCPU_INC(cnt.v_swtch); /* * Aggregate this thread's tick stats in the parent so they are not * lost. Also add the child usage to our own when the final thread -- cgit v1.2.3