函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cpu_stopper_thread

函数原型:static void cpu_stopper_thread(unsigned int cpu)

返回类型:void

参数:

类型参数名称
unsigned intcpu
500  stopper等于per_cpu(cpu_stopper, cpu)
503  repeat :
504  work = NULL
505  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & lock)
506  如果非链表为空
507  work等于list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & list of pending works , structcpu_stop_work, list)
509  删除链表项并重新初始化
511  raw_spin_unlock_irq( & lock)
513  如果work
514  fn等于fn
515  arg等于arg
516  done等于done
520  preempt_count_inc()
521  ret等于fn(arg)
522  如果done
523  如果retcollected return value 等于ret
527  preempt_count_dec()
528  WARN_ONCE(抢占计数值, "cpu_stop: %ps(%p) leaked preempt count\n", fn, arg)
530  转到:repeat