diff options
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r-- | include/linux/jiffies.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index abb6ac639e8..1a9cf78bfce 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -115,10 +115,20 @@ static inline u64 get_jiffies_64(void) | |||
115 | ((long)(a) - (long)(b) >= 0)) | 115 | ((long)(a) - (long)(b) >= 0)) |
116 | #define time_before_eq(a,b) time_after_eq(b,a) | 116 | #define time_before_eq(a,b) time_after_eq(b,a) |
117 | 117 | ||
118 | /* | ||
119 | * Calculate whether a is in the range of [b, c]. | ||
120 | */ | ||
118 | #define time_in_range(a,b,c) \ | 121 | #define time_in_range(a,b,c) \ |
119 | (time_after_eq(a,b) && \ | 122 | (time_after_eq(a,b) && \ |
120 | time_before_eq(a,c)) | 123 | time_before_eq(a,c)) |
121 | 124 | ||
125 | /* | ||
126 | * Calculate whether a is in the range of [b, c). | ||
127 | */ | ||
128 | #define time_in_range_open(a,b,c) \ | ||
129 | (time_after_eq(a,b) && \ | ||
130 | time_before(a,c)) | ||
131 | |||
122 | /* Same as above, but does so with platform independent 64bit types. | 132 | /* Same as above, but does so with platform independent 64bit types. |
123 | * These must be used when utilizing jiffies_64 (i.e. return value of | 133 | * These must be used when utilizing jiffies_64 (i.e. return value of |
124 | * get_jiffies_64() */ | 134 | * get_jiffies_64() */ |