printk: add pr_flush()
authorJohn Ogness <john.ogness@linutronix.de>
Thu, 21 Apr 2022 21:22:46 +0000 (23:28 +0206)
committerPetr Mladek <pmladek@suse.com>
Fri, 22 Apr 2022 19:30:58 +0000 (21:30 +0200)
commit3b604ca81202eea2a917eb6491e90f610fba0ec7
tree553f119d8bed892bed778c99e11faaaadf119cd6
parent03a749e628fdbc665d7f9712637f880a79da8b78
printk: add pr_flush()

Provide a might-sleep function to allow waiting for console printers
to catch up to the latest logged message.

Use pr_flush() whenever it is desirable to get buffered messages
printed before continuing: suspend_console(), resume_console(),
console_stop(), console_start(), console_unblank().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220421212250.565456-12-john.ogness@linutronix.de
include/linux/printk.h
kernel/printk/printk.c