函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smpboot_thread_fn - percpu hotplug thread loop function*@data: thread data pointer* Checks for thread stop and park conditions. Calls the necessary* setup, cleanup, park and unpark functions for the registered* thread.

函数原型:static int smpboot_thread_fn(void *data)

返回类型:int

参数:

类型参数名称
void *data
109  td等于data
110  ht等于ht
112  当1循环
113  set_current_state(睡眠态)
114  禁止抢占()
119  如果cleanupstatus不等于HP_THREAD_NONEcleanup(cpu, cpu_online(cpu))
121  释放内存
122  返回:0
128  如果parkstatus恒等于HP_THREAD_ACTIVE
129  BUG_ON(cpu != 当前cpu ID())
130  park(cpu)
133  kthread_parkme()
135  继续下一循环
138  BUG_ON(cpu != 当前cpu ID())
142  :status恒等于HP_THREAD_NONE
145  如果setupsetup(cpu)
148  继续下一循环
150  :status恒等于HP_THREAD_PARKED
153  如果unparkunpark(cpu)
156  继续下一循环
159  如果非thread_should_run(cpu)则
161  schedule()
162  否则
165  thread_fn(cpu)