函数逻辑报告 |
Source Code:lib\scatterlist.c |
Create Date:2022-07-27 07:17:42 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__sg_alloc_table - Allocate and initialize an sg table with given allocator*@table: The sg table header to use*@nents: Number of entries in sg list*@max_ents: The maximum number of entries the allocator returns per call*@nents_first_chunk: Number of
函数原型:int __sg_alloc_table(struct sg_table *table, unsigned int nents, unsigned int max_ents, struct scatterlist *first_chunk, unsigned int nents_first_chunk, gfp_t gfp_mask, sg_alloc_fn *alloc_fn)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct sg_table * | table | |
unsigned int | nents | |
unsigned int | max_ents | |
struct scatterlist * | first_chunk | |
unsigned int | nents_first_chunk | |
gfp_t | gfp_mask | |
sg_alloc_fn * | alloc_fn |
273 | curr_max_ents等于如果nents_first_chunk否则max_ents |
286 | prv = NULL |
287 | 循环 |
288 | alloc_size等于left |
290 | 如果alloc_size大于curr_max_ents则 |
291 | alloc_size等于curr_max_ents |
292 | sg_size等于alloc_size减1 |
293 | 否则sg_size等于alloc_size |
298 | 如果first_chunk则 |
299 | sg等于first_chunk |
300 | first_chunk = NULL |
301 | 否则 |
302 | sg等于alloc_fn(alloc_size, gfp_mask) |
304 | 如果此条件成立可能性小(为编译器优化)(!sg)则 |
311 | 如果prv则 number of mapped entries 等于 original size of list 先自加 |
314 | 返回:负ENOMEM |
317 | 初始化散列表 |
337 | curr_max_ents等于max_ents |
340 | 返回:0 |
名称 | 描述 |
---|---|
sg_alloc_table | sg_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_alloc_table_chained | sg_alloc_table_chained - Allocate and chain SGLs in an sg table*@table: The sg table header to use*@nents: Number of entries in sg list*@first_chunk: first SGL*@nents_first_chunk: number of the SGL of @first_chunk* Description: |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |