]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: fix idle time accounting.
authorBen Gras <ben@minix3.org>
Mon, 4 Oct 2010 19:12:55 +0000 (19:12 +0000)
committerBen Gras <ben@minix3.org>
Mon, 4 Oct 2010 19:12:55 +0000 (19:12 +0000)
kernel/system/do_getinfo.c

index 5bcfc9b31c4f56586886889a1263cc6cc53ae3e0..e640a8bcbdd55cf5434c8471bc8e4c329fa1d4c3 100644 (file)
@@ -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);