aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 15:20:52 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 15:05:02 -0400
commit017730c11241e26577673eb9d957cfc66172ea91 (patch)
tree3585323be944d23814b3e28b50042b7477cc9206 /kernel/sched.c
parent24cd5d111e8c713e62cda7ca1d01232402e3d3c9 (diff)
ftrace: fix wakeups
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 673b588b713b..9ca4a2e6a236 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -642,6 +642,24 @@ static inline void update_rq_clock(struct rq *rq)
642# define const_debug static const 642# define const_debug static const
643#endif 643#endif
644 644
645/**
646 * runqueue_is_locked
647 *
648 * Returns true if the current cpu runqueue is locked.
649 * This interface allows printk to be called with the runqueue lock
650 * held and know whether or not it is OK to wake up the klogd.
651 */
652int runqueue_is_locked(void)
653{
654 int cpu = get_cpu();
655 struct rq *rq = cpu_rq(cpu);
656 int ret;
657
658 ret = spin_is_locked(&rq->lock);
659 put_cpu();
660 return ret;
661}
662
645/* 663/*
646 * Debugging: various feature bits 664 * Debugging: various feature bits
647 */ 665 */