diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 21:20:52 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 21:05:02 +0200 |
commit | 017730c11241e26577673eb9d957cfc66172ea91 (patch) | |
tree | 3585323be944d23814b3e28b50042b7477cc9206 /kernel/sched.c | |
parent | 24cd5d111e8c713e62cda7ca1d01232402e3d3c9 (diff) | |
download | kernel_samsung_aries-017730c11241e26577673eb9d957cfc66172ea91.zip kernel_samsung_aries-017730c11241e26577673eb9d957cfc66172ea91.tar.gz kernel_samsung_aries-017730c11241e26577673eb9d957cfc66172ea91.tar.bz2 |
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.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 673b588..9ca4a2e 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -642,6 +642,24 @@ static inline void update_rq_clock(struct rq *rq) # define const_debug static const #endif +/** + * runqueue_is_locked + * + * Returns true if the current cpu runqueue is locked. + * This interface allows printk to be called with the runqueue lock + * held and know whether or not it is OK to wake up the klogd. + */ +int runqueue_is_locked(void) +{ + int cpu = get_cpu(); + struct rq *rq = cpu_rq(cpu); + int ret; + + ret = spin_is_locked(&rq->lock); + put_cpu(); + return ret; +} + /* * Debugging: various feature bits */ |