lkml.org 
[lkml]   [2002]   [May]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 11 May 2002 00:19:40 -0400
FromJim Houston <>
SubjectRe: 64-bit jiffies, a better solution
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [from the cache]
©2003-2008