lkml.org 
[lkml]   [1997]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: /proc/penguin addition
From
Date
psj@cgmlarson.com (Patrick St. Jean) writes:

> Here's a patch to 2.1.43 that adds an entry in /proc named penguin. It
> returns sort of an uptime like rating. Anything less than a day rates a
> "penguin", 1 to 10 days are kilopenguins, 10 to 100 are megapenguins, 100
> to 1000 are gigapenguins, and 1000 to 10000 are terapenguins. If you
> think that you can keep a machine up for more than 27 years, I'll put in
> more... A patch for the 2.0 series will arrive shortly
[....]
> + {
> + float penguins = 0;
^^^^^^^^^^^^^^^^^^^
I think you can't use Floating point in kernel code because the FPU
context is not saved there. You'll probably mess with the user process
FPU context. Better use fixed point arithmetic with integers.

-Andi

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.437 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site