Date: Sat, 2 Mar 2013 22:19:17 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r247671 - head/sys/ofed/include/linux Message-ID: <201303022219.r22MJHKh065172@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sat Mar 2 22:19:17 2013 New Revision: 247671 URL: http://svnweb.freebsd.org/changeset/base/247671 Log: 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. Modified: head/sys/ofed/include/linux/timer.h Modified: head/sys/ofed/include/linux/timer.h ============================================================================== --- head/sys/ofed/include/linux/timer.h Sat Mar 2 21:59:07 2013 (r247670) +++ head/sys/ofed/include/linux/timer.h Sat Mar 2 22:19:17 2013 (r247671) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303022219.r22MJHKh065172>