On Mon, May 22, 2000 at 03:17:31PM -0700, John Hawkes wrote:
> Is there a reason, other than historical, why "jiffies" is "unsigned
> long"? Isn't that a 64-bit type in a 64-bit kernel?
At HZ = 100Hz a 32-bit variable would overflow after about 457 days. In
real live this has been an actual problem :-) Some people run their
systems at HZ 1024Hz or even 10kHz.
> A more general question: I have an application that gets information
> from the kernel through a read of a /proc node, formatted via a struct
> that has fields that are typed in ways that change in size, depending
> upon whether it's dealing with a 32-bit kernel or a 64-bit kernel. I'd
> like to be able to have this 32-bit app work with a 64-bit kernel. Is
> there a general protocol to support this?
About which proc-file are we talking? In general you should probably
just design the file's format such that it can be parsed unambiguously;
generally there ASCII files are somewhat preffered.
Ralf
|