函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\stop_machine.c Create Date:2022-07-27 12:24:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:stop_machine_from_inactive_cpu - stop_machine() from inactive CPU*@fn: the function to run*@data: the data ptr for the @fn()*@cpus: the cpus to run the @fn() on (NULL = any online cpu)* This is identical to stop_machine() but can be called from a CPU which

函数原型:int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)

返回类型:int

参数:

类型参数名称
cpu_stop_fn_tfn
void *data
const struct cpumask *cpus
669  struct multi_stop_data msdata = {fn = fn, data = data, active_cpus = cpus}
675  BUG_ON(cpu_active(These macros fold the SMP functionality into a single CPU system()))
676  Like num_online_cpus(), but hotplug cpu uses us, so we need this. 等于num_active_cpus()加1
679  当非mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically循环
680  cpu_relax()
683  set_state( & msdata, MULTI_STOP_PREPARE)
684  cpu_stop_init_done( & done, num_active_cpus())
685  queue_stop_cpus_work(cpu_active_mask, This is the cpu_stop function which stops the CPU. , & msdata, & done)
687  ret等于This is the cpu_stop function which stops the CPU.
690  当非mpletion_done - Test to see if a completion has any waiters*@x: completion structure* Return: 0 if there are waiters (wait_for_completion() in progress)* 1 if there are no waiters.* Note, this will always return true if complete_all() was called on @X.循环
691  cpu_relax()
693  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.
694  返回:如果ret否则collected return value