Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk_safe.c Create Date:2022-07-28 10:07:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vprintk_func

Proto:__printf(1, 0) int vprintk_func(const char *fmt, va_list args)

Type:int

Parameter:

TypeParameterName
const char *fmt
va_listargs
367  If Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(printk_context) & PRINTK_NMI_DIRECT_CONTEXT_MASK && Define the various spin_lock methods. Note we define these* regardless of whether CONFIG_SMP or CONFIG_PREEMPTION are set. The* various methods are defined as nops in the case they are not* required.( & The logbuf_lock protects kmsg buffer, indices, counters. This can be taken* within the scheduler's rq lock. It must be released before calling* console_unlock() or anything else that might wake up a process.) Then
371  len = Must be called under logbuf_lock.
372  raw_spin_unlock( & The logbuf_lock protects kmsg buffer, indices, counters. This can be taken* within the scheduler's rq lock. It must be released before calling* console_unlock() or anything else that might wake up a process.)
373  defer_console_output()
374  Return len
378  If Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(printk_context) & PRINTK_NMI_CONTEXT_MASK Then Return vprintk_nmi(fmt, args)
382  If Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(printk_context) & SPDX-License-Identifier: GPL-2.0-or-later Then Return Lock-less printk(), to avoid deadlocks should the printk() recurse* into itself. It uses a per-CPU buffer to store the message, just like* NMI.
386  Return vprintk_default(fmt, args)
Caller
NameDescribe
printkprintk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
vprintk