aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-26 14:20:29 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-26 15:20:22 -0500
commitb342501cd31e5546d0c9ca8ceff5ded1832f9e5b (patch)
tree3cd5778565a45a74e8ad0640093927a77d4d625e /include/linux
parent694593e3374a67d95ece6a275a1f181644c2c4d8 (diff)
sched: allow architectures to specify sched_clock_stable
Allow CONFIG_HAVE_UNSTABLE_SCHED_CLOCK architectures to still specify that their sched_clock() implementation is reliable. This will be used by x86 to switch on a faster sched_clock_cpu() implementation on certain CPU types. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8981e52c714f..a063d19b7a7d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1670,6 +1670,16 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
1670 return set_cpus_allowed_ptr(p, &new_mask); 1670 return set_cpus_allowed_ptr(p, &new_mask);
1671} 1671}
1672 1672
1673/*
1674 * Architectures can set this to 1 if they have specified
1675 * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig,
1676 * but then during bootup it turns out that sched_clock()
1677 * is reliable after all:
1678 */
1679#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
1680extern int sched_clock_stable;
1681#endif
1682
1673extern unsigned long long sched_clock(void); 1683extern unsigned long long sched_clock(void);
1674 1684
1675extern void sched_clock_init(void); 1685extern void sched_clock_init(void);