summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-03-02 22:19:17 +0000
committermav <mav@FreeBSD.org>2013-03-02 22:19:17 +0000
commitdc07b9e1fa131ca6467aa562fcf343fd3affe6d0 (patch)
tree0bd81d55334e93964d08712bb9458b9693104ceb /sys/ofed
parentef11ac73b3176b99700c594fc51d06c2b43dfc06 (diff)
downloadFreeBSD-src-dc07b9e1fa131ca6467aa562fcf343fd3affe6d0.zip
FreeBSD-src-dc07b9e1fa131ca6467aa562fcf343fd3affe6d0.tar.gz
MFcalloutng:
Give OFED Linux wrapper own "expires" field instead of abusing callout's c_time, which will change its type and units with calloutng commit.
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/include/linux/timer.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/ofed/include/linux/timer.h b/sys/ofed/include/linux/timer.h
index ed4ed4a..3a32131 100644
--- a/sys/ofed/include/linux/timer.h
+++ b/sys/ofed/include/linux/timer.h
@@ -37,11 +37,10 @@
struct timer_list {
struct callout timer_callout;
void (*function)(unsigned long);
- unsigned long data;
+ unsigned long data;
+ unsigned long expires;
};
-#define expires timer_callout.c_time
-
static inline void
_timer_fn(void *context)
{
@@ -65,13 +64,16 @@ do { \
callout_init(&(timer)->timer_callout, CALLOUT_MPSAFE); \
} while (0)
-#define mod_timer(timer, expire) \
- callout_reset(&(timer)->timer_callout, (expire) - jiffies, \
- _timer_fn, (timer))
+#define mod_timer(timer, exp) \
+do { \
+ (timer)->expires = exp; \
+ callout_reset(&(timer)->timer_callout, (exp) - jiffies, \
+ _timer_fn, (timer)); \
+} while (0)
#define add_timer(timer) \
callout_reset(&(timer)->timer_callout, \
- (timer)->timer_callout.c_time - jiffies, _timer_fn, (timer))
+ (timer)->expires - jiffies, _timer_fn, (timer))
#define del_timer(timer) callout_stop(&(timer)->timer_callout)
#define del_timer_sync(timer) callout_drain(&(timer)->timer_callout)
OpenPOWER on IntegriCloud