From 84c08397ba203aca791277bb66b9d71afb6a6537 Mon Sep 17 00:00:00 2001 From: Dmitriy Zavin Date: Tue, 26 Sep 2006 10:52:42 +0200 Subject: [PATCH] --- yaml --- r: 35979 b: refs/heads/master c: 3b171672831b9633c2ed8fa94805255cd4d5af19 h: refs/heads/master i: 35977: ae55c15199f22aaecfaab5398c1f1ef9243eaf2c 35975: 412b0eab16c34e3945dab229656e4c089876f017 v: v3 --- [refs] | 2 +- trunk/include/linux/jiffies.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 391ea74fbf3f..790689fea284 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b89ebd0b0a65d5371aa9ad98e873c4616056ca68 +refs/heads/master: 3b171672831b9633c2ed8fa94805255cd4d5af19 diff --git a/trunk/include/linux/jiffies.h b/trunk/include/linux/jiffies.h index 329ebcffa106..c8d5f207c3d4 100644 --- a/trunk/include/linux/jiffies.h +++ b/trunk/include/linux/jiffies.h @@ -115,6 +115,21 @@ static inline u64 get_jiffies_64(void) ((long)(a) - (long)(b) >= 0)) #define time_before_eq(a,b) time_after_eq(b,a) +/* Same as above, but does so with platform independent 64bit types. + * These must be used when utilizing jiffies_64 (i.e. return value of + * get_jiffies_64() */ +#define time_after64(a,b) \ + (typecheck(__u64, a) && \ + typecheck(__u64, b) && \ + ((__s64)(b) - (__s64)(a) < 0)) +#define time_before64(a,b) time_after64(b,a) + +#define time_after_eq64(a,b) \ + (typecheck(__u64, a) && \ + typecheck(__u64, b) && \ + ((__s64)(a) - (__s64)(b) >= 0)) +#define time_before_eq64(a,b) time_after_eq64(b,a) + /* * Have the 32 bit jiffies value wrap 5 minutes after boot * so jiffies wrap bugs show up earlier.