函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.

函数原型:static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu)

返回类型:struct rchan_buf

参数:

类型参数名称
struct rchan *chan
unsigned intcpu
446  struct rchan_buf * buf = NULL
449  如果 One global buffer ? 则返回:per_cpu_ptr( per-cpu channel buffers , 0)
452  buf等于lay_create_buf - allocate and initialize a channel buffer*@chan: the relay channel* Returns channel buffer if successful, %NULL otherwise.
453  如果非buf则返回:NULL
456  如果 has a filename associated?
457  dentry等于relay_create_buf_file(chan, buf, cpu)
458  如果非dentry则转到:free_buf
460  relay_set_buf_dentry(buf, dentry)
461  否则
463  dentry等于create_buf_file(NULL, NULL, S_IRUSR, buf, & One global buffer ? )
466  如果是错误或空则转到:free_buf
470  his buf's cpu 等于cpu
471  __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.
473  如果 One global buffer ?
474  per_cpu_ptr( per-cpu channel buffers , 0)等于buf
475  his buf's cpu 等于0
478  返回:buf
480  free_buf :
481  lay_destroy_buf - destroy an rchan_buf struct and associated buffer*@buf: the buffer struct
482  返回:NULL
调用者
名称描述
relay_prepare_cpu
relay_openlay_open - create a new relay channel*@base_filename: base name of files to create, %NULL for buffering only*@parent: dentry of parent directory, %NULL for root directory or buffer*@subbuf_size: size of sub-buffers*@n_subbufs: number of sub-buffers*@cb: