Re: MSEC_TO_JIFFIES is messed up...

From: Valdis . Kletnieks
Date: Wed May 12 2004 - 15:25:30 EST

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.....

Attachment: pgp00000.pgp
Description: PGP signature