函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-27 12:51:40
Last Modify:2020-03-17 19:20:22 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__relay_reset - reset a channel buffer*@buf: the channel buffer*@init: 1 if this is a first-time initialization* See relay_reset() for description of effect.

函数原型:static void __relay_reset(struct rchan_buf *buf, unsigned int init)

返回类型:void

参数:

类型参数名称
struct rchan_buf *buf
unsigned intinit
355  如果init
356  init_waitqueue_head( & ader wait queue )
357  初始化对象
358  init_irq_work( & ader wakeup , wakeup_readers - wake up readers waiting on a channel*@work: contains the channel buffer* This is the function used to defer reader waking)
359  否则
360  irq_work_sync( & ader wakeup )
363  count of sub-buffers produced 等于0
364  count of sub-buffers consumed 等于0
365  ytes consumed in cur read subbuf 等于0
366  uffer has been finalized 等于0
367  start of current sub-buffer 等于start of channel buffer
368  current offset into sub-buffer 等于0
370 i小于 number of sub-buffers per buffer 循环padding counts per sub-buffer [i]等于0
373  subbuf_start(buf, start of current sub-buffer , NULL, 0)
调用者
名称描述
relay_resetlay_reset - reset the channel*@chan: the channel* This has the effect of erasing all data from all channel buffers* and restarting the channel in its initial state. The buffers* are not freed, so any mappings are still in effect.* NOTE
relay_open_buflay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.