summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/hrtimer.h
blob: 28fc89979ee95759c4386bc5419bf0890054bd59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _BP_HRTIMER_H
#define _BP_HRTIMER_H
#include <linux/version.h>
#include_next <linux/hrtimer.h>
#include <linux/interrupt.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
					  const enum hrtimer_mode mode)
{
	ktime_t _time = { .tv64 = time };
	hrtimer_start(timer, _time, mode);
}
#define hrtimer_start LINUX_BACKPORT(hrtimer_start)
#endif

#endif /* _BP_HRTIMER_H */