https://github.com/torvalds/linux
Revision 103a1d5c57fac3623613b130b104f5b03367b31c authored by Alan Cox on 04 August 2008, 16:56:28 UTC, committed by Linus Torvalds on 05 August 2008, 00:12:08 UTC
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8183006
Raw File
Tip revision: 103a1d5c57fac3623613b130b104f5b03367b31c authored by Alan Cox on 04 August 2008, 16:56:28 UTC
sc1200 watchdog driver: Fix locking, sems and coding style
Tip revision: 103a1d5
bust_spinlocks.c
/*
 * lib/bust_spinlocks.c
 *
 * Provides a minimal bust_spinlocks for architectures which don't have one of their own.
 *
 * bust_spinlocks() clears any spinlocks which would prevent oops, die(), BUG()
 * and panic() information from reaching the user.
 */

#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/tty.h>
#include <linux/wait.h>
#include <linux/vt_kern.h>


void __attribute__((weak)) bust_spinlocks(int yes)
{
	if (yes) {
		++oops_in_progress;
	} else {
#ifdef CONFIG_VT
		unblank_screen();
#endif
		if (--oops_in_progress == 0)
			wake_up_klogd();
	}
}


back to top