Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\smp.c Create Date:2022-07-28 10:55:52
Last Modify:2020-03-17 15:12:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:smp_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.

Proto:int smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, void *info, int wait)

Type:int

Parameter:

TypeParameterName
const struct cpumask *mask
smp_call_func_tfunc
void *info
intwait
377  cpu = get_cpu()
378  If pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then Go to call
382  nodemask = Returns a pointer to the cpumask of CPUs on Node 'node'.
383  When cpu < nr_cpu_ids cycle
385  If cpu_online(cpu) Then Go to call
390  cpu = cpumask_any_and - pick a "random" cpu from *mask1 & *mask2*@mask1: the first input cpumask*@mask2: the second input cpumask* Returns >= nr_cpu_ids if no cpus set.(mask, cpu_online_mask)
391  call :
392  ret = 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.
393  put_cpu()
394  Return ret