From c33ec61a4bd3c66f8810a15821bee4db1d348daa Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 28 May 2005 18:54:31 +0000 Subject: [PATCH] added msecs_to_jiffies() compatibility definition --- include/linux/time.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/linux/time.h diff --git a/include/linux/time.h b/include/linux/time.h new file mode 100644 index 00000000..306b80fb --- /dev/null +++ b/include/linux/time.h @@ -0,0 +1,24 @@ + +#ifndef __COMPAT_LINUX_TIME_H +#define __COMPAT_LINUX_TIME_H + +#include + +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +static inline unsigned long msecs_to_jiffies(const unsigned int m) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (m + (1000 / HZ) - 1) / (1000 / HZ); +#elif HZ > 1000 && !(HZ % 1000) + return m * (HZ / 1000); +#else + return (m * HZ + 999) / 1000; +#endif +}; + +#endif + +#endif + -- 2.26.2