Messages in this thread | | | Date | Wed, 12 May 2004 22:55:38 +0200 | From | Ingo Molnar <> | Subject | Re: MSEC_TO_JIFFIES is messed up... |
| |
* Andrew Morton <akpm@osdl.org> wrote:
> #if HZ=1000 > #define MSEC_TO_JIFFIES(msec) (msec) > #define JIFFIES_TO_MESC(jiffies) (jiffies) > #elif HZ=100 > #define MSEC_TO_JIFFIES(msec) (msec * 10) > #define JIFFIES_TO_MESC(jiffies) (jiffies / 10) > #else > #define MSEC_TO_JIFFIES(msec) ((HZ * (msec) + 999) / 1000) > #define JIFFIES_TO_MSEC(jiffies) ... > #endif
the HZ=100 define is broken. (it's correct in the -A2 patch i just sent.)
why the +999 rounding up in the generic case?
Ingo - 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/
| |