函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__sg_free_table - Free a previously mapped sg table*@table: The sg table header to use*@max_ents: The maximum number of entries per single scatterlist*@nents_first_chunk: Number of entries int the (preallocated) first* scatterlist chunk, 0 means no such

函数原型:void __sg_free_table(struct sg_table *table, unsigned int max_ents, unsigned int nents_first_chunk, sg_free_fn *free_fn)

返回类型:void

参数:

类型参数名称
struct sg_table *table
unsigned intmax_ents
unsigned intnents_first_chunk
sg_free_fn *free_fn
196  curr_max_ents等于如果nents_first_chunk否则max_ents
198  如果此条件成立可能性小(为编译器优化)(! the list )则返回
201  sgl等于 the list
202  original size of list 循环
203  alloc_size等于 original size of list
212  如果alloc_size大于curr_max_ents
213  next等于sg_chain_ptr( & sgl[curr_max_ents - 1])
215  sg_size等于alloc_size减1
216  否则
217  sg_size等于alloc_size
218  next = NULL
221  original size of list 减等于sg_size
222  如果nents_first_chunknents_first_chunk等于0
224  否则free_fn(sgl, alloc_size)
226  sgl等于next
227  curr_max_ents等于max_ents
230  the list = NULL
调用者
名称描述
sg_free_table 释放散列表
sg_alloc_tablesg_alloc_table - Allocate and initialize an sg table*@table: The sg table header to use*@nents: Number of entries in sg list*@gfp_mask: GFP allocation mask* Description:* Allocate and initialize an sg table. If @nents@ is larger than
sg_free_table_chainedsg_free_table_chained - Free a previously mapped sg table*@table: The sg table header to use*@nents_first_chunk: size of the first_chunk SGL passed to* sg_alloc_table_chained* Description:* Free an sg table previously allocated and setup with