函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\smp.c Create Date:2022-07-27 11:56:07
Last Modify:2020-03-17 15:12:54 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:smp_call_function_single - Run a function on a specific CPU*@func: The function to run. This must be fast and non-blocking.*@info: An arbitrary pointer to pass to the function.*@wait: If true, wait until function has completed on other CPUs.

函数原型:int smp_call_function_single(int cpu, smp_call_func_t func, void *info, int wait)

返回类型:int

参数:

类型参数名称
intcpu
smp_call_func_tfunc
void *info
intwait
273  call_single_data_t csd_stack = {flags = CSD_FLAG_LOCK | CSD_FLAG_SYNCHRONOUS, }
283  this_cpu等于get_cpu()
291  WARN_ON_ONCE(cpu_online(this_cpu) && 已禁止中断() && !Low level drivers may need that to know if they can schedule in* their unblank() callback or not. So let's export it.)
300  WARN_ON_ONCE(!in_task())
302  csd等于csd_stack
303  如果非wait
304  csd等于this_cpu_ptr( & csd_data)
305  csd_lock(csd)
308  err等于Insert a previously allocated call_single_data_t element* for execution on the given CPU. data must already have* ->func, ->info, and ->flags set.
310  如果waitsd_lock/csd_unlock used to serialize access to per-cpu csd resources* For non-synchronous ipi calls the csd can still be in use by the* previous function call. For multi-cpu calls its even more interesting
313  put_cpu()
315  返回:err
调用者
名称描述
init_cache_level
rcu_barrier_barrier - Wait until all in-flight call_rcu() callbacks complete
smp_call_function_anysmp_call_function_any - Run a function on any of the given cpus*@mask: The mask of cpus it can run on.*@func: The function to run. This must be fast and non-blocking.*@info: An arbitrary pointer to pass to the function.
smp_call_function_manysmp_call_function_many(): Run a function on a set of other CPUs
on_each_cpu_cond_mask_each_cpu_cond(): Call a function on each processor for which* the supplied function cond_func returns true, optionally waiting* for all the required CPUs to finish