summaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-23 19:29:11 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 07:27:54 +0200
commit03cc45c0a5b9b7f74768feb43b9a2525d203bbdb (patch)
treeacb5b1d692c9fdf526863f641547744b0a2d38a0 /include/net/pkt_sched.h
parent[NET_SCHED]: kill PSCHED_TDIFF (diff)
downloadlinux-03cc45c0a5b9b7f74768feb43b9a2525d203bbdb.tar.xz
linux-03cc45c0a5b9b7f74768feb43b9a2525d203bbdb.zip
[NET_SCHED]: turn PSCHED_TDIFF_SAFE into inline function
Also rename to psched_tdiff_bounded. 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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 163973740207..e6b1da050d32 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -51,10 +51,14 @@ typedef long psched_tdiff_t;
#define PSCHED_GET_TIME(stamp) \
((stamp) = PSCHED_NS2US(ktime_to_ns(ktime_get())))
-#define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \
- min_t(long long, (tv1) - (tv2), bound)
#define PSCHED_PASTPERFECT 0
+static inline psched_tdiff_t
+psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound)
+{
+ return min(tv1 - tv2, bound);
+}
+
struct qdisc_watchdog {
struct hrtimer timer;
struct Qdisc *qdisc;