函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__kthread_create_on_node

函数原型:static __printf(4, 0) struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data), void *data, int node, const char namefmt[], va_list args)

返回类型:struct task_struct

参数:

类型参数名称
int (*threadfn
void *data
intnode
const charnamefmt
va_listargs
298  Lockdep needs to run a non-constant initializer for on-stack* completions - so we use the _ONSTACK() variant for those that* are on the kernel stack:(done)
300  create等于开辟内存
303  如果非create则返回:错误号
305  threadfn等于threadfn
306  data等于data
307  node等于node
308  done等于done
310  加自旋锁
311  添加链表项
312  自旋锁解锁
314  唤醒中断线程
320  如果此条件成立可能性小(为编译器优化)(wait_for_completion_killable( & done))则
326  如果xchg( & done, NULL)则返回:错误号
332  wait_for_completion( & done)
334  task等于 Result passed back to kthread_create() from kthreadd.
335  如果非是错误
336  static const struct sched_param param = {sched_priority = 0}
343  vsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@args: Arguments for the format string* This function generally
344  set_task_comm(task, name)
349  改变调度策略和线程优先级
350  set_cpus_allowed_ptr(task, cpu_all_mask)
352  释放内存
353  返回:task
调用者
名称描述
kthread_create_on_nodekthread_create_on_node - create a kthread
__kthread_create_worker