函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__kthread_create_worker

函数原型:static __printf(3, 0) struct kthread_worker *__kthread_create_worker(int cpu, unsigned int flags, const char namefmt[], va_list args)

返回类型:struct kthread_worker

参数:

类型参数名称
intcpu
unsigned intflags
const charnamefmt
va_listargs
687  node等于NUMA_NO_NODE
689  worker等于分配内存并置零
690  如果非worker则返回:错误号
693  kthread_init_worker(worker)
695  如果cpu大于等于0则node等于cpu_to_node(cpu)
698  task等于__kthread_create_on_node(kthread_worker_fn - kthread function to process kthread_worker*@worker_ptr: pointer to initialized kthread_worker* This function implements the main cycle of kthread worker. It processes* work_list until it is stopped with kthread_stop(), worker, node, namefmt, args)
700  如果是错误则转到:fail_task
703  如果cpu大于等于0则kthread_bind - bind a just-created kthread to a cpu
706  flags等于flags
707  task等于task
708  唤醒中断线程
709  返回:worker
711  fail_task :
712  释放内存
713  返回:错误指示
调用者
名称描述
kthread_create_workerkthread_create_worker - create a kthread worker*@flags: flags modifying the default behavior of the worker*@namefmt: printf-style name for the kthread worker (task)
kthread_create_worker_on_cpukthread_create_worker_on_cpu - create a kthread worker and bind it* it to a given CPU and the associated NUMA node