函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:relay_prepare_cpu

函数原型:int relay_prepare_cpu(unsigned int cpu)

返回类型:int

参数:

类型参数名称
unsigned intcpu
527  mutex_lock( & list of open channels, for cpu hotplug )
529  如果buf等于per_cpu_ptr( per-cpu channel buffers , cpu)则继续下一循环
531  buf等于lay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.
532  如果非buf
533  打印错误信息("relay: cpu %d buffer creation failed\n", cpu)
534  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.
535  返回:负ENOMEM
537  per_cpu_ptr( per-cpu channel buffers , cpu)等于buf
539  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.
540  返回:0