Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

console: introduce console_lock guard()s

Having this, guards like these work:
guard(console_lock)();
or
scoped_guard(console_lock) {
...
}

See e.g. "vc_screen: use guard()s" later in this series.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250814072456.182853-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
4847d118 9391ab1e

+2
+2
include/linux/console.h
··· 666 666 */ 667 667 extern atomic_t ignore_console_lock_warning; 668 668 669 + DEFINE_LOCK_GUARD_0(console_lock, console_lock(), console_unlock()); 670 + 669 671 extern void console_init(void); 670 672 671 673 /* For deferred console takeover */