Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:int smp_call_function_single(int cpu, smp_call_func_t func, void *info, int wait)

Type:int

Parameter:

TypeParameterName
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) && Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.() && !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  If Not wait Then
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  If wait Then sd_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  Return err