Back to home page

OSCL-LXR

 
 

    


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