From a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a Mon Sep 17 00:00:00 2001 From: We-unite <3205135446@qq.com> Date: Sat, 8 Mar 2025 22:04:20 +0800 Subject: Initial commit: OpenHarmony-v4.0-Release --- lib/bust_spinlocks.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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 000000000..8be59f84e --- /dev/null +++ b/lib/bust_spinlocks.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * 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 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.2.3-70-g09d2