Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-28 11:46:58
Last Modify:2020-03-17 19:20:22 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.

Proto:static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu)

Type:struct rchan_buf

Parameter:

TypeParameterName
struct rchan *chan
unsigned intcpu
446  struct rchan_buf * buf = NULL
449  If One global buffer ? Then Return 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  If Not buf Then Return NULL
456  If has a filename associated? Then
457  dentry = relay_create_buf_file(chan, buf, cpu)
458  If Not dentry Then Go to free_buf
460  relay_set_buf_dentry(buf, dentry)
461  Else
463  dentry = create_buf_file(NULL, NULL, S_IRUSR, buf, & One global buffer ? )
466  If IS_ERR_OR_NULL(dentry) Then Go to 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  If One global buffer ? Then
474  per_cpu_ptr( per-cpu channel buffers , 0) = buf
475  his buf's cpu = 0
478  Return buf
480  free_buf :
481  lay_destroy_buf - destroy an rchan_buf struct and associated buffer*@buf: the buffer struct
482  Return NULL
Caller
NameDescribe
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: