From: Ben Gras Date: Mon, 4 Oct 2010 19:12:55 +0000 (+0000) Subject: kernel: fix idle time accounting. X-Git-Tag: v3.2.0~792 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/named.html?a=commitdiff_plain;h=c521f2a1380944fb4c4672b4d658451a902d6863;p=minix.git kernel: fix idle time accounting. --- diff --git a/kernel/system/do_getinfo.c b/kernel/system/do_getinfo.c index 5bcfc9b31..e640a8bcb 100644 --- a/kernel/system/do_getinfo.c +++ b/kernel/system/do_getinfo.c @@ -24,6 +24,8 @@ PRIVATE void update_idle_time(void) int i; struct proc * idl = proc_addr(IDLE); + idl->p_cycles = make64(0, 0); + for (i = 0; i < CONFIG_MAX_CPUS ; i++) { idl->p_cycles = add64(idl->p_cycles, get_cpu_var(i, idle_proc).p_cycles);