函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io-wq.c Create Date:2022-07-29 10:55:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_wq_create

函数原型:struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)

返回类型:struct io_wq

参数:

类型参数名称
unsignedbounded
struct io_wq_data *data
1031  ret等于负ENOMEM
1034  wq等于分配内存并置零
1035  如果非wq则返回:错误号
1038  wqes等于分配数组内存并置零
1039  如果非wqes
1040  释放内存
1041  返回:错误号
1044  get_work等于get_work
1045  put_work等于put_work
1048  user等于user
1049  creds等于creds
1051  for_each_node(node)
1053  alloc_node等于node
1055  如果非NUMA节点状态(alloc_node)则alloc_node等于NUMA_NO_NODE
1057  wqe等于根据内存节点分配内存
1058  如果非wqe则转到:err
1060  wqes[node]等于wqe
1061  node等于alloc_node
1062  max_workers等于bounded
1063  atomic_set( & nr_running, 0)
1064  如果user
1068  atomic_set( & nr_running, 0)
1069  wq等于wq
1070  spin_lock_init( & lock)
1071  INIT_WQ_LIST( & work_list)
1072  INIT_HLIST_NULLS_HEAD( & free_list, 0)
1073  初始化链表头
1076  init_completion( & done)
1079  mm等于mm
1081  manager等于kthread_create - create a kthread on the current node*@threadfn: the function to run in the thread*@data: data pointer for @threadfn()*@namefmt: printf-style format string for the thread name*@arg(Manager thread. Tasked with creating new workers, if we need them., wq, "io_wq_manager")
1082  如果非是错误
1083  唤醒中断线程
1084  wait_for_completion: - waits for completion of a task*@x: holds the state of this particular completion* This waits to be signaled for completion of a specific task. It is NOT* interruptible and there is no timeout.* See also similar routines (i
1086  ret等于负ENOMEM
1087  转到:err
1089  _completion - reinitialize a completion structure*@x: pointer to completion structure that is to be reinitialized* This inline function should be used to reinitialize a completion structure so it can* be reused
1090  返回:wq
1093  ret等于错误
1094  mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
1095  err :
1096  for_each_node(node)
1097  释放内存
1098  释放内存
1099  释放内存
1100  返回:错误号