Fix variable casting:

- Jiffies or ticks in FreeBSD have integer type and are not long.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2015-03-27 19:08:11 +00:00
parent 11500c4eaa
commit 8de7453501

View File

@ -45,14 +45,12 @@ msecs_to_jiffies(int msec)
return (tvtohz(&tv));
}
#define jiffies ticks
#define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz)
#define time_after(a, b) ((long)(b) - (long)(a) < 0)
#define time_after(a, b) ((int)((b) - (a)) < 0)
#define time_before(a, b) time_after(b,a)
#define time_after_eq(a, b) ((long)(a) - (long)(b) >= 0)
#define time_after_eq(a, b) ((int)((a) - (b)) >= 0)
#define time_before_eq(a, b) time_after_eq(b, a)
#define HZ hz