函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:stop_two_cpus - stops two cpus*@cpu1: the cpu to stop*@cpu2: the other cpu to stop*@fn: function to execute*@arg: argument to @fn* Stops both the current and specified CPU and runs @fn on one of them.* returns when both are completed.

函数原型:int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)

返回类型:int

参数:

类型参数名称
unsigned intcpu1
unsigned intcpu2
cpu_stop_fn_tfn
void *arg
324  msdata = (struct multi_stop_data){fn = fn, data = arg, Like num_online_cpus(), but hotplug cpu uses us, so we need this. = 2, active_cpus = cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(cpu1), }
331  work1 = work2 = (struct cpu_stop_work){fn = This is the cpu_stop function which stops the CPU. , arg = & msdata, work1 = & done}
337  cpu_stop_init_done( & done, 2)
338  set_state( & msdata, MULTI_STOP_PREPARE)
340  如果cpu1大于cpu2swap - swap values of @a and @b*@a: first value*@b: second value(cpu1, cpu2)
342  如果cpu_stop_queue_two_works(cpu1, & work1, cpu2, & work2)则返回:负ENOENT
345  wait_for_completion: - waits for completion of a task*@x: holds the state of this particular completion* This waits to be signaled for completion of a specific task. It is NOT* interruptible and there is no timeout.* See also similar routines (i
346  返回:collected return value