projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
660d34f
)
added msecs_to_jiffies() compatibility definition
author
Frank Mori Hess
<fmhess@speakeasy.net>
Sat, 28 May 2005 18:54:31 +0000
(18:54 +0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Sat, 28 May 2005 18:54:31 +0000
(18:54 +0000)
include/linux/time.h
[new file with mode: 0644]
patch
|
blob
diff --git a/include/linux/time.h
b/include/linux/time.h
new file mode 100644
(file)
index 0000000..
306b80f
--- /dev/null
+++ b/
include/linux/time.h
@@ -0,0
+1,24
@@
+
+#ifndef __COMPAT_LINUX_TIME_H
+#define __COMPAT_LINUX_TIME_H
+
+#include <linux/version.h>
+
+#include_next <linux/time.h>
+
+#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
+