函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:_worker_pool - initialize a newly zalloc'd worker_pool*@pool: worker_pool to initialize* Initialize a newly zalloc'd @pool

函数原型:static int init_worker_pool(struct worker_pool *pool)

返回类型:int

参数:

类型参数名称
struct worker_pool *pool
3413  spin_lock_init( & he pool lock )
3414  I: pool ID 等于负1
3415  I: the associated cpu 等于负1
3416  I: the associated node ID 等于NUMA_NO_NODE
3417  X: flags 或等于POOL_DISASSOCIATED
3418  L: watchdog timestamp 等于jiffies
3419  初始化链表头
3420  初始化链表头
3421  hash_init - initialize a hash table*@hashtable: hashtable to be initialized* Calculates the size of the hashtable from the given parameter, otherwise* same as hash_init_size.* This has to be a macro since HASH_BITS() will not work on pointers since(a workers is either on busy_hash or idle_list, or the manager )
3423  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & L: worker idle timeout , idle_worker_timeout, TIMER_DEFERRABLE)
3425  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & L: SOS timer for workers , pool_mayday_timeout, 0)
3427  初始化链表头
3429  ida_init( & worker IDs for task name )
3430  INIT_HLIST_NODE( & PL: unbound_pool_hash node )
3431  PL: refcnt for unbound pools 等于1
3434  I: worker attributes 等于alloc_workqueue_attrs - allocate a workqueue_attrs* Allocate a new workqueue_attrs, initialize with default settings and* return it.* Return: The allocated new workqueue_attr on success. %NULL on failure.
3435  如果非I: worker attributes 则返回:负ENOMEM
3437  返回:0
调用者
名称描述
get_unbound_poolget_unbound_pool - get a worker_pool with the specified attributes*@attrs: the attributes of the worker_pool to get* Obtain a worker_pool which has the same attributes as @attrs, bump the* reference count and return it
workqueue_init_earlyworkqueue_init_early - early init for workqueue subsystem* This is the first half of two-staged workqueue subsystem initialization* and invoked as soon as the bare basics - memory allocation, cpumasks and* idr are up