]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sched: print preempt count
authorAndrew Morton <akpm@osdl.org>
Mon, 18 Oct 2004 16:11:02 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 18 Oct 2004 16:11:02 +0000 (09:11 -0700)
Better debugging output when the CPU scheduler detects atomicity errors.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index c223ff02fc5267d5bf5bae0231dea46c3c38fd49..2e67de4b356a63f5a8c7778628ec72f79ecfd50b 100644 (file)
@@ -2491,7 +2491,9 @@ asmlinkage void __sched schedule(void)
         */
        if (likely(!(current->state & (TASK_DEAD | TASK_ZOMBIE)))) {
                if (unlikely(in_atomic())) {
-                       printk(KERN_ERR "bad: scheduling while atomic!\n");
+                       printk(KERN_ERR "scheduling while atomic: "
+                               "%s/0x%08x/%d\n",
+                               current->comm, preempt_count(), current->pid);
                        dump_stack();
                }
        }