函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lay_create_buf - allocate and initialize a channel buffer*@chan: the relay channel* Returns channel buffer if successful, %NULL otherwise.

函数原型:static struct rchan_buf *relay_create_buf(struct rchan *chan)

返回类型:struct rchan_buf

参数:

类型参数名称
struct rchan *chan
166  如果 number of sub-buffers per buffer 大于Maximum allocatable size 除*的长度则返回:NULL
169  buf等于分配内存并置零
170  如果非buf则返回:NULL
172  padding counts per sub-buffer 等于分配数组内存
174  如果非padding counts per sub-buffer 则转到:free_buf
177  start of channel buffer 等于lay_alloc_buf - allocate a channel buffer*@buf: the buffer struct*@size: total size of the buffer* Returns a pointer to the resulting buffer, %NULL if unsuccessful. The* passed in size will get page aligned, if it isn't already.
178  如果非start of channel buffer 则转到:free_buf
181  associated channel 等于chan
182  对象增加引用
183  返回:buf
185  free_buf :
186  kfree(padding counts per sub-buffer )
187  kfree(buf)
188  返回:NULL
调用者
名称描述
relay_open_buflay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.