函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate and initialize the internal cpumask dependend resources.

函数原型:static struct parallel_data *padata_alloc_pd(struct padata_shell *ps)

返回类型:struct parallel_data

参数:

类型参数名称
struct padata_shell *ps
431  pinst等于pinst
436  cbcpumask等于cbcpu
437  pcpumask等于pcpu
439  pd等于分配内存并置零
440  如果非pd则转到:err
443  pqueue等于alloc_percpu(structpadata_parallel_queue)
444  如果非pqueue则转到:err_free_pd
447  squeue等于alloc_percpu(structpadata_serial_queue)
448  如果非squeue则转到:err_free_pqueue
451  ps等于ps
452  如果pd_setup_cpumasks(pd, pcpumask, cbcpumask)则转到:err_free_squeue
455  Initialize all percpu queues used by parallel workers
456  Initialize all percpu queues used by serial workers
457  atomic_set( & seq_nr, - 1)
458  atomic_set( & reorder_objects, 0)
459  atomic_set( & refcnt, 1)
460  spin_lock_init( & lock)
461  cpu等于Uniprocessor. Assume all masks are "1".
462  INIT_WORK( & reorder_work, invoke_padata_reorder)
464  返回:pd
466  err_free_squeue :
467  释放内存
468  err_free_pqueue :
469  释放内存
470  err_free_pd :
471  kfree(pd)
472  err :
473  返回:NULL
调用者
名称描述
padata_replace_oneReplace the internal control structure with a new one.
padata_alloc_shellpadata_alloc_shell - Allocate and initialize padata shell.*@pinst: Parent padata_instance object.