Re: 64-bit jiffies, a better solution

Jim Houston
2002-05-11T04:15:47Z

Hi!

First what problem are you trying to solve?
Why not have both variables and if they happen
to endup in the same cache line you probably
need years worth of jiffies to notice how
long one more add takes. E.g.

jiffies_64++;
jiffies++;

To round out the list of options, how about a few lines of
inline asm? Maybe something like:

extern unsigned long long jiffie_64;
extern unsigned int jiffie;
__asm__ (" \
.data
.align 8
.global jiffie
.global jiffie_64
.type jiffie,@object
.size jiffie,4
.type jiffie_64,@object
.size jiffie_64,8
jiffie_64:
jiffie:
.long 0, 0
");

Adding the obvious ifdef of course. Aside for broken
binutils this might be portable code :-)

Jim Houston - Concurrent Computer
Corp.