diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 14:29:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:55 -0400 |
commit | 3bebcda28077375470dd60545b71bba2f83335fd (patch) | |
tree | a0d610788ccfe8d3b50d6ebf3df014e98f6387bc /include/net/pkt_sched.h | |
parent | 03cc45c0a5b9b7f74768feb43b9a2525d203bbdb (diff) |
[NET_SCHED]: turn PSCHED_GET_TIME into inline function
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index e6b1da050d32..b2cc9a8ed4e7 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -48,11 +48,13 @@ typedef long psched_tdiff_t; | |||
48 | #define PSCHED_NS2US(x) ((x) >> 10) | 48 | #define PSCHED_NS2US(x) ((x) >> 10) |
49 | 49 | ||
50 | #define PSCHED_TICKS_PER_SEC PSCHED_NS2US(NSEC_PER_SEC) | 50 | #define PSCHED_TICKS_PER_SEC PSCHED_NS2US(NSEC_PER_SEC) |
51 | #define PSCHED_GET_TIME(stamp) \ | ||
52 | ((stamp) = PSCHED_NS2US(ktime_to_ns(ktime_get()))) | ||
53 | |||
54 | #define PSCHED_PASTPERFECT 0 | 51 | #define PSCHED_PASTPERFECT 0 |
55 | 52 | ||
53 | static inline psched_time_t psched_get_time(void) | ||
54 | { | ||
55 | return PSCHED_NS2US(ktime_to_ns(ktime_get())); | ||
56 | } | ||
57 | |||
56 | static inline psched_tdiff_t | 58 | static inline psched_tdiff_t |
57 | psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) | 59 | psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) |
58 | { | 60 | { |