Function report |
Source Code:kernel\workqueue.c |
Create Date:2022-07-28 09:27:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_workqueue
Proto:struct workqueue_struct *alloc_workqueue(const char *fmt, unsigned int flags, int max_active, ...)
Type:struct workqueue_struct
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | fmt | |
unsigned int | flags | |
int | max_active |
4225 | tbl_size = 0 |
4237 | If flags & WQ_UNBOUND && max_active == 1 Then flags |= __WQ_ORDERED |
4241 | If flags & WQ_POWER_EFFICIENT && see the comment above the definition of WQ_POWER_EFFICIENT Then flags |= WQ_UNBOUND |
4245 | If flags & WQ_UNBOUND Then tbl_size = nr_node_ids * size of PWR: unbound pwqs indexed by node [0] |
4248 | wq = 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). |
4249 | If Not wq Then Return NULL |
4252 | If flags & WQ_UNBOUND Then |
4254 | If Not PW: only for unbound wqs Then Go to err_free_wq |
4258 | va_start(args, max_active) |
4262 | max_active = If max_active Else WQ_DFL_ACTIVE |
4268 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & protects this wq ) |
4269 | atomic_set( & lush in progress , 0) |
4275 | wq_init_lockdep(wq) |
4278 | If alloc_and_link_pwqs(wq) < 0 Then Go to err_unreg_lockdep |
4281 | If can kworkers be created yet? && Workqueues which may be used during memory reclaim should have a rescuer* to guarantee forward progress. < 0 Then Go to err_destroy |
4284 | If hot fields used during command issue, aligned to cacheline & WQ_SYSFS && workqueue_sysfs_register(wq) Then Go to err_destroy |
4292 | mutex_lock( & wq_pool_mutex) |
4294 | mutex_lock( & protects this wq ) |
4297 | mutex_unlock( & protects this wq ) |
4301 | mutex_unlock( & wq_pool_mutex) |
4303 | Return wq |
4305 | err_unreg_lockdep : |
4306 | wq_unregister_lockdep(wq) |
4307 | wq_free_lockdep(wq) |
4308 | err_free_wq : |
4311 | Return NULL |
4312 | err_destroy : |
4314 | Return NULL |
Name | Describe |
---|---|
workqueue_init_early | workqueue_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 |
test_ww_mutex_init | |
pm_start_workqueue | |
rcu_init | |
cgroup_wq_init | |
cgroup1_wq_init | |
padata_alloc | padata_alloc - allocate and initialize a padata instance and specify* cpumasks for serial and parallel workers |
default_bdi_init | |
blk_dev_init | |
blkcg_init | |
throtl_init | |
bio_integrity_init | |
fscrypt_init | scrypt_init() - Set up for fs encryption. |
fsverity_init_workqueue |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |