[lkml]   [2004]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: MSEC_TO_JIFFIES is messed up...
On Wed, 12 May 2004 22:03:05 +0200, Ingo Molnar said:

> due to overflows. But we know that HZ is 1000 in the arch-dependent
> param.h, and in sched.c we use the HZ dependent variant:

That should read we "know" that HZ is 1000....

How about this instead?

#if HZ == 1000
#define JIFFIES_TO_MSEC(x) (x)
#define JIFFIES_TO_MSEC(x) ((x) * 1000 / HZ)

That will DTRT if somebody changes HZ for their build, and still allow
us to avoud the *1000/1000 conversion for most builds.....
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 14:03    [W:0.126 / U:4.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site