From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- lib/bust_spinlocks.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/bust_spinlocks.c (limited to 'lib/bust_spinlocks.c') diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c new file mode 100644 index 00000000..f8e0e536 --- /dev/null +++ b/lib/bust_spinlocks.c @@ -0,0 +1,31 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include + + +void __attribute__((weak)) bust_spinlocks(int yes) +{ + if (yes) { + ++oops_in_progress; + } else { +#ifdef CONFIG_VT + unblank_screen(); +#endif + console_unblank(); + if (--oops_in_progress == 0) + wake_up_klogd(); + } +} -- cgit v1.3.1