Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\smpboot.c Create Date:2022-07-28 09:33:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__smpboot_create_thread

Proto:static int __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)

Type:int

Parameter:

TypeParameterName
struct smp_hotplug_thread *ht
unsigned intcpu
173  tsk = per_cpu_ptr(store, cpu)
176  If tsk Then Return 0
179  td = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
180  If Not td Then Return -ENOMEM
182  cpu = cpu
183  ht = ht
185  tsk = kthread_create_on_cpu - Create a cpu bound kthread*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@cpu: The cpu on which the thread should be bound,*@namefmt: printf-style name for the thread
187  If IS_ERR(tsk) Then
188  free previously allocated memory
189  Return PTR_ERR(tsk)
195  kthread_park - park a thread created by kthread_create()
196  get_task_struct(tsk)
197  per_cpu_ptr(store, cpu) = tsk
198  If create Then
205  If Not wait_task_inactive(tsk, Used in tsk->state again: ) Then WARN_ON(1)
207  Else create(cpu)
210  Return 0
Caller
NameDescribe
smpboot_create_threads
smpboot_register_percpu_threadsmpboot_register_percpu_thread - Register a per_cpu thread related* to hotplug*@plug_thread: Hotplug thread descriptor* Creates and starts the threads on all online cpus.