summaryrefslogtreecommitdiff
path: root/include/linux/jiffies.h
diff options
context:
space:
mode:
authorEliezer Tamir <eliezer.tamir@linux.intel.com>2013-07-03 00:22:47 +0400
committerDavid S. Miller <davem@davemloft.net>2013-07-03 02:53:53 +0400
commit1bc2774d866444c5b316fd1dc2b782f20c762cf4 (patch)
treedfadce12c9f45c80cd372b27456151be000c8aee /include/linux/jiffies.h
parent7e6d4da837385d9aa2e5fd84e0a6042cddc9e708 (diff)
downloadlinux-1bc2774d866444c5b316fd1dc2b782f20c762cf4.tar.xz
net: convert lls to use time_in_range()
Time in range will fail safely if we move to a different cpu with an extremely large clock skew. Add time_in_range64() and convert lls to use it. changelog: v2 - fixed double call to sched_clock in can_poll_ll - fixed checkpatchisms Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r--include/linux/jiffies.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 8fb8edf12417..97ba4e78a37e 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -139,6 +139,10 @@ static inline u64 get_jiffies_64(void)
((__s64)(a) - (__s64)(b) >= 0))
#define time_before_eq64(a,b) time_after_eq64(b,a)
+#define time_in_range64(a, b, c) \
+ (time_after_eq64(a, b) && \
+ time_before_eq64(a, c))
+
/*
* These four macros compare jiffies and 'a' for convenience.
*/