函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:devm_gen_pool_create - managed gen_pool_create*@dev: device that provides the gen_pool*@min_alloc_order: log base 2 of number of bytes each bitmap bit represents*@nid: node selector for allocated gen_pool, %NUMA_NO_NODE for all nodes*@name: name of a

函数原型:struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order, int nid, const char *name)

返回类型:struct gen_pool

参数:

类型参数名称
struct device *dev
intmin_alloc_order
intnid
const char *name
826  const char * pool_name = NULL
829  如果获得gen_pool(如果有的话)的设备则返回:错误号
832  如果name
833  pool_name等于kstrdup_const - conditionally duplicate an existing const string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Strings allocated by kstrdup_const should be freed by kfree_const.
834  如果非pool_name则返回:错误号
838  ptr等于devres_alloc(devm_gen_pool_release, ptr的长度, GFP_KERNEL)
839  如果非ptr则转到:free_pool_name
842  pool等于gen_pool_create - create a new special memory pool*@min_alloc_order: log base 2 of number of bytes each bitmap bit represents*@nid: node id of the node the pool structure should be allocated on, or -1* Create a new special memory pool that can be used to
843  如果非pool则转到:free_devres
846  ptr等于pool
847  name等于pool_name
848  devres_add(dev, ptr)
850  返回:pool
852  free_devres :
853  devres_free(ptr)
854  free_pool_name :
855  kfree_const - conditionally free memory*@x: pointer to the memory* Function calls kfree only if @x is not in .rodata section.
857  返回:错误号