Messages in this thread | | | Subject | Re: MSEC_TO_JIFFIES is messed up... | From | Valdis.Kletnieks@vt ... | Date | Wed, 12 May 2004 16:18:17 -0400 |
| |
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) #else #define JIFFIES_TO_MSEC(x) ((x) * 1000 / HZ) #endif
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] | |