函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lay_late_setup_files - triggers file creation*@chan: channel to operate on*@base_filename: base name of files to create*@parent: dentry of parent directory, %NULL for root directory* Returns 0 if successful, non-zero otherwise

函数原型:int relay_late_setup_files(struct rchan *chan, const char *base_filename, struct dentry *parent)

返回类型:int

参数:

类型参数名称
struct rchan *chan
const char *base_filename
struct dentry *parent
653  err等于0
660  如果非chan或非base_filename则返回:负EINVAL
663  长字符串复制
665  mutex_lock( & list of open channels, for cpu hotplug )
667  如果此条件成立可能性小(为编译器优化)( has a filename associated? )则
668  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
669  返回:负EEXIST
671  has a filename associated? 等于1
672  parent dentry passed to open 等于parent
674  如果 One global buffer ?
675  err等于负EINVAL
676  buf等于per_cpu_ptr( per-cpu channel buffers , 0)
677  如果非WARN_ON_ONCE(!buf)则
679  如果dentry且非WARN_ON_ONCE(! One global buffer ? )则
681  err等于0
684  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
685  返回:err
688  curr_cpu等于get_cpu()
694  遍历在线CPU(i)
695  buf等于per_cpu_ptr( per-cpu channel buffers , i)
697  WARN_ONCE(1, r conditions "CPU has no buffer!\n")
698  err等于负EINVAL
699  退出
702  dentry等于relay_create_buf_file(chan, buf, i)
704  err等于负EINVAL
705  退出
708  如果curr_cpu恒等于i
712  否则
713  buf等于buf
714  dentry等于dentry
715  smp_mb()
721  如果此条件成立可能性小(为编译器优化)(err)则退出
724  put_cpu()
725  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
727  返回:err