git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysctl extern cleanup: rtmutex
[safe/jmp/linux-2.6]
/
kernel
/
sched_clock.c
diff --git
a/kernel/sched_clock.c
b/kernel/sched_clock.c
index
479ce56
..
5b49613
100644
(file)
--- a/
kernel/sched_clock.c
+++ b/
kernel/sched_clock.c
@@
-236,6
+236,18
@@
void sched_clock_idle_wakeup_event(u64 delta_ns)
}
EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);
}
EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);
+unsigned long long cpu_clock(int cpu)
+{
+ unsigned long long clock;
+ unsigned long flags;
+
+ local_irq_save(flags);
+ clock = sched_clock_cpu(cpu);
+ local_irq_restore(flags);
+
+ return clock;
+}
+
#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
void sched_clock_init(void)
#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
void sched_clock_init(void)
@@
-251,17
+263,12
@@
u64 sched_clock_cpu(int cpu)
return sched_clock();
}
return sched_clock();
}
-#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
unsigned long long cpu_clock(int cpu)
{
unsigned long long cpu_clock(int cpu)
{
-
unsigned long long clock
;
- unsigned long flags;
+
return sched_clock_cpu(cpu)
;
+}
- local_irq_save(flags);
- clock = sched_clock_cpu(cpu);
- local_irq_restore(flags);
+#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
- return clock;
-}
EXPORT_SYMBOL_GPL(cpu_clock);
EXPORT_SYMBOL_GPL(cpu_clock);