函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alize newly alloced @pwq which is associated with @wq and @pool

函数原型:static void init_pwq(struct pool_workqueue *pwq, struct workqueue_struct *wq, struct worker_pool *pool)

返回类型:void

参数:

类型参数名称
struct pool_workqueue *pwq
struct workqueue_struct *wq
struct worker_pool *pool
3733  BUG_ON((unsignedlong)pwq & WORK_STRUCT_FLAG_MASK)
3735  memset(pwq, 0, pwq的长度)
3737  I: the associated pool 等于pool
3738  I: the owning workqueue 等于wq
3739  L: flushing color 等于负1
3740  L: reference count 等于1
3741  初始化链表头
3742  初始化链表头
3743  初始化链表头
3744  INIT_WORK( & Release of unbound pwq is punted to system_wq. See put_pwq()* and pwq_unbound_release_workfn() for details. pool_workqueue* itself is also RCU protected so that the first pwq can be* determined without grabbing wq->mutex., Scheduled on system_wq by put_pwq() when an unbound pwq hits zero refcnt* and needs to be destroyed.)
调用者
名称描述
alloc_unbound_pwqbtain a pool matching @attr and create a pwq associating the pool and @wq
alloc_and_link_pwqs