函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cpu_stop_queue_two_works

函数原型:static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, int cpu2, struct cpu_stop_work *work2)

返回类型:int

参数:

类型参数名称
intcpu1
struct cpu_stop_work *work1
intcpu2
struct cpu_stop_work *work2
248  stopper1等于per_cpu_ptr( & cpu_stopper, cpu1)
249  stopper2等于per_cpu_ptr( & cpu_stopper, cpu2)
253  retry :
261  禁止抢占()
262  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & lock)
263  raw_spin_lock_nested( & lock, For trivial one-depth nesting of a lock-class, the following* global define can be used. (Subsystems with multiple levels* of nesting should define their own lock-nesting subclasses.))
265  如果非s this stopper enabled? 或非s this stopper enabled?
266  err等于负ENOENT
267  转到:unlock
280  如果此条件成立可能性小(为编译器优化)(stop_cpus_in_progress)则
281  err等于负EDEADLK
282  转到:unlock
285  err等于0
286  __cpu_stop_queue_work(stopper1, work1, & wakeq)
287  __cpu_stop_queue_work(stopper2, work2, & wakeq)
289  unlock :
290  raw_spin_unlock( & lock)
291  raw_spin_unlock_irq( & lock)
293  如果此条件成立可能性小(为编译器优化)(err == - EDEADLK)则
294  禁用抢占和中断()
296 stop_cpus_in_progress循环
297  cpu_relax()
299  转到:retry
302  wake_up_q( & wakeq)
303  禁用抢占和中断()
305  返回:err
调用者
名称描述
stop_two_cpusstop_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.