]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] APM compile fix, "stime" update broke it
authorBrad Heilbrun <bheilbrun@paypal.com>
Tue, 2 Jul 2002 04:54:32 +0000 (21:54 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 2 Jul 2002 04:54:32 +0000 (21:54 -0700)
Fix APM that got broken by getting rid of "struct tms" and clock_t.

arch/i386/kernel/apm.c

index d6814ebef9a4eff60116db41cefd90c6e9bf173b..d19bce8ee5f7bf6e9a11232768e8295f3fb307e3 100644 (file)
@@ -814,16 +814,16 @@ recalc:
        if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
                use_apm_idle = 0;
                last_jiffies = jiffies;
-               last_stime = current->times.tms_stime;
+               last_stime = current->stime;
        } else if (jiffies_since_last_check > idle_period) {
                unsigned int idle_percentage;
 
-               idle_percentage = current->times.tms_stime - last_stime;
+               idle_percentage = current->stime - last_stime;
                idle_percentage *= 100;
                idle_percentage /= jiffies_since_last_check;
                use_apm_idle = (idle_percentage > idle_threshold);
                last_jiffies = jiffies;
-               last_stime = current->times.tms_stime;
+               last_stime = current->stime;
        }
 
        bucket = IDLE_LEAKY_MAX;