1#ifndef _LINUX_JIFFIES_H
2#define _LINUX_JIFFIES_H
3
4#include <linux/kernel.h>
5#include <linux/types.h>
6#include <linux/spinlock.h>
7#include <linux/seqlock.h>
8#include <asm/system.h>
9#include <asm/param.h>
10
11
12
13
14
15
16extern u64 jiffies_64;
17extern unsigned long volatile jiffies;
18
19#if (BITS_PER_LONG < 64)
20u64 get_jiffies_64(void);
21#else
22static inline u64 get_jiffies_64(void)
23{
24 return (u64)jiffies;
25}
26#endif
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41#define time_after(a,b) \
42 (typecheck(unsigned long, a) && \
43 typecheck(unsigned long, b) && \
44 ((long)(b) - (long)(a) < 0))
45#define time_before(a,b) time_after(b,a)
46
47#define time_after_eq(a,b) \
48 (typecheck(unsigned long, a) && \
49 typecheck(unsigned long, b) && \
50 ((long)(a) - (long)(b) >= 0))
51#define time_before_eq(a,b) time_after_eq(b,a)
52
53#endif
54