Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-28 09:27:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:allocate the attrs and pwqs for later installation

Proto:static struct apply_wqattrs_ctx *apply_wqattrs_prepare(struct workqueue_struct *wq, const struct workqueue_attrs *attrs)

Type:struct apply_wqattrs_ctx

Parameter:

TypeParameterName
struct workqueue_struct *wq
const struct workqueue_attrs *attrs
3895  lockdep_assert_held( & wq_pool_mutex)
3897  ctx = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
3899  new_attrs = 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.
3900  tmp_attrs = 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.
3901  If Not ctx || Not new_attrs || Not tmp_attrs Then Go to out_free
3909  copy_workqueue_attrs(new_attrs, attrs)
3910  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
3911  If Value for the false possibility is greater at compile time(pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.) Then pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3919  copy_workqueue_attrs(tmp_attrs, new_attrs)
3926  dfl_pwq = btain a pool matching @attr and create a pwq associating the pool and @wq
3927  If Not dfl_pwq Then Go to out_free
3930  for_each_node(node)
3933  If Not pwq_tbl[node] Then Go to out_free
3935  Else
3937  pwq_tbl[node] = dfl_pwq
3942  copy_workqueue_attrs(new_attrs, attrs)
3943  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
3944  attrs to apply = new_attrs
3946  arget workqueue = wq
3947  _workqueue_attrs - free a workqueue_attrs*@attrs: workqueue_attrs to free* Undo alloc_workqueue_attrs().
3948  Return ctx
3950  out_free :
3951  _workqueue_attrs - free a workqueue_attrs*@attrs: workqueue_attrs to free* Undo alloc_workqueue_attrs().
3952  _workqueue_attrs - free a workqueue_attrs*@attrs: workqueue_attrs to free* Undo alloc_workqueue_attrs().
3953  the resources after success or abort
3954  Return NULL
Caller
NameDescribe
apply_workqueue_attrs_locked
workqueue_apply_unbound_cpumask