diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-07-03 11:50:21 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-03 11:50:21 +0300 |
commit | 341924049558e5f7c1a148a2c461a417933d35d9 (patch) | |
tree | 1340b4f2131737ef4be63f18ee74cd73ad12cd3e /include/linux/hrtimer_defs.h | |
parent | 516337048fa40496ae5ca9863c367ec991a44d9a (diff) | |
parent | 4a8f81b8c053aad250ee247b219904ada72df9a4 (diff) | |
download | linux-341924049558e5f7c1a148a2c461a417933d35d9.tar.xz |
Merge branch 'timers/vdso' into timers/core
so the hyper-v clocksource update can be applied.
Diffstat (limited to 'include/linux/hrtimer_defs.h')
-rw-r--r-- | include/linux/hrtimer_defs.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h new file mode 100644 index 000000000000..2d3e3c5fb946 --- /dev/null +++ b/include/linux/hrtimer_defs.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_HRTIMER_DEFS_H +#define _LINUX_HRTIMER_DEFS_H + +#include <linux/ktime.h> + +#ifdef CONFIG_HIGH_RES_TIMERS + +/* + * The resolution of the clocks. The resolution value is returned in + * the clock_getres() system call to give application programmers an + * idea of the (in)accuracy of timers. Timer values are rounded up to + * this resolution values. + */ +# define HIGH_RES_NSEC 1 +# define KTIME_HIGH_RES (HIGH_RES_NSEC) +# define MONOTONIC_RES_NSEC HIGH_RES_NSEC +# define KTIME_MONOTONIC_RES KTIME_HIGH_RES + +#else + +# define MONOTONIC_RES_NSEC LOW_RES_NSEC +# define KTIME_MONOTONIC_RES KTIME_LOW_RES + +#endif + +#endif |