blob: 0bb04a96a6d49888d62ad1afeea7251f4fd0d85a [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Russell King112f38a42010-12-15 19:23:07 +00002/*
3 * sched_clock.h: support for extending counters to full 64-bit ns counter
Russell King112f38a42010-12-15 19:23:07 +00004 */
Stephen Boyd38ff87f2013-06-01 23:39:40 -07005#ifndef LINUX_SCHED_CLOCK
6#define LINUX_SCHED_CLOCK
Russell King112f38a42010-12-15 19:23:07 +00007
Stephen Boyd38ff87f2013-06-01 23:39:40 -07008#ifdef CONFIG_GENERIC_SCHED_CLOCK
Pavel Tatashin5d2a4e92018-07-19 16:55:41 -04009extern void generic_sched_clock_init(void);
Stephen Boyd38ff87f2013-06-01 23:39:40 -070010
Stephen Boyde7e3ff12013-07-18 16:21:17 -070011extern void sched_clock_register(u64 (*read)(void), int bits,
12 unsigned long rate);
Daniel Lezcano364eba42015-10-29 18:33:47 +010013#else
Pavel Tatashin5d2a4e92018-07-19 16:55:41 -040014static inline void generic_sched_clock_init(void) { }
Daniel Lezcano364eba42015-10-29 18:33:47 +010015
16static inline void sched_clock_register(u64 (*read)(void), int bits,
17 unsigned long rate)
18{
Daniel Lezcano364eba42015-10-29 18:33:47 +010019}
20#endif
Russell King211baa702011-01-11 16:23:04 +000021
Russell King112f38a42010-12-15 19:23:07 +000022#endif