]>
Commit | Line | Data |
---|---|---|
064af421 BP |
1 | #ifndef __LINUX_JIFFIES_WRAPPER_H |
2 | #define __LINUX_JIFFIES_WRAPPER_H 1 | |
3 | ||
4 | #include_next <linux/jiffies.h> | |
5 | ||
6 | #include <linux/version.h> | |
7 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
8 | ||
9 | /* Same as above, but does so with platform independent 64bit types. | |
10 | * These must be used when utilizing jiffies_64 (i.e. return value of | |
11 | * get_jiffies_64() */ | |
12 | #define time_after64(a,b) \ | |
13 | (typecheck(__u64, a) && \ | |
14 | typecheck(__u64, b) && \ | |
15 | ((__s64)(b) - (__s64)(a) < 0)) | |
16 | #define time_before64(a,b) time_after64(b,a) | |
17 | ||
18 | #define time_after_eq64(a,b) \ | |
19 | (typecheck(__u64, a) && \ | |
20 | typecheck(__u64, b) && \ | |
21 | ((__s64)(a) - (__s64)(b) >= 0)) | |
22 | #define time_before_eq64(a,b) time_after_eq64(b,a) | |
23 | ||
24 | #endif /* linux kernel < 2.6.19 */ | |
25 | ||
26 | #endif |