函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk_safe.c Create Date:2022-07-27 11:07:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Flush data from the associated per-CPU buffer. The function* can be called either via IRQ work or independently.

函数原型:static void __printk_safe_flush(struct irq_work *work)

返回类型:void

参数:

类型参数名称
struct irq_work *work
182  read_lock等于__RAW_SPIN_LOCK_INITIALIZER(read_lock)
184  s等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(work, structprintk_safe_seq_buf, work)
197  raw_spin_lock_irqsave( & read_lock, flags)
199  i等于0
200  more :
201  len等于atomic_read( & length of written data )
209  如果ii大于等于lenlen大于buffer的长度则
210  msg等于"printk_safe_flush: internal error\n"
212  printk_safe_flush_line(msg, strlen - Find the length of a string*@s: The string to be sized)
213  len等于0
216  如果非len则转到:out
220  smp_rmb()
221  i加等于printk part of the temporary buffer line by line
229  如果atomic_cmpxchg( & length of written data , len, 0)不等于len则转到:more
232  out :
233  report_message_lost(s)
234  raw_spin_unlock_irqrestore( & read_lock, flags)
调用者
名称描述
printk_safe_flushprintk_safe_flush - flush all per-cpu nmi buffers.* The buffers are flushed automatically via IRQ work. This function* is useful only when someone wants to be sure that all buffers have* been flushed at some point.