Back to home page

LXR

 
 

    


0001 /*
0002  * lib/bust_spinlocks.c
0003  *
0004  * Provides a minimal bust_spinlocks for architectures which don't have one of their own.
0005  *
0006  * bust_spinlocks() clears any spinlocks which would prevent oops, die(), BUG()
0007  * and panic() information from reaching the user.
0008  */
0009 
0010 #include <linux/kernel.h>
0011 #include <linux/printk.h>
0012 #include <linux/spinlock.h>
0013 #include <linux/tty.h>
0014 #include <linux/wait.h>
0015 #include <linux/vt_kern.h>
0016 #include <linux/console.h>
0017 
0018 
0019 void __attribute__((weak)) bust_spinlocks(int yes)
0020 {
0021     if (yes) {
0022         ++oops_in_progress;
0023     } else {
0024 #ifdef CONFIG_VT
0025         unblank_screen();
0026 #endif
0027         console_unblank();
0028         if (--oops_in_progress == 0)
0029             wake_up_klogd();
0030     }
0031 }