diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-26 14:20:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-26 15:20:22 -0500 |
commit | b342501cd31e5546d0c9ca8ceff5ded1832f9e5b (patch) | |
tree | 3cd5778565a45a74e8ad0640093927a77d4d625e /include | |
parent | 694593e3374a67d95ece6a275a1f181644c2c4d8 (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')
-rw-r--r-- | include/linux/sched.h | 10 |
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 | ||
1680 | extern int sched_clock_stable; | ||
1681 | #endif | ||
1682 | |||
1673 | extern unsigned long long sched_clock(void); | 1683 | extern unsigned long long sched_clock(void); |
1674 | 1684 | ||
1675 | extern void sched_clock_init(void); | 1685 | extern void sched_clock_init(void); |