linux-origin
[Top] [All Lists]

Re: unsigned long jiffies

To: hawkes@xxxxxxxxxxxxxxxxxxxx (John Hawkes)
Subject: Re: unsigned long jiffies
From: kanoj@xxxxxxxxxxxxxxxxxxx (Kanoj Sarcar)
Date: Mon, 22 May 2000 15:27:52 -0700 (PDT)
Cc: linux-origin@xxxxxxxxxxx (linux-origin)
In-reply-to: <059901bfc43b$866bf5c0$1d70eea9@xxxxxxxxxxxxxxx> from "John Hawkes" at May 22, 2000 03:17:31 PM
Sender: owner-linux-origin@xxxxxxxxxxx
> 
> Is there a reason, other than historical, why "jiffies" is "unsigned
> long"?  Isn't that a 64-bit type in a 64-bit kernel?
> 
> 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?
> 
> John
> 

You can either use if (sizeof(long) == sizeof(int)), or some variation
of this, or #if BITS_PER_LONG == 64.

Doesn't IRIX have the same problem?

Kanoj

<Prev in Thread] Current Thread [Next in Thread>