Function report |
Source Code:lib\scatterlist.c |
Create Date:2022-07-28 06:20:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__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
Proto: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)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 = If nents_first_chunk Else max_ents |
286 | prv = NULL |
287 | Do |
288 | alloc_size = left |
290 | If alloc_size > curr_max_ents Then |
291 | alloc_size = curr_max_ents |
292 | sg_size = alloc_size - 1 |
293 | Else sg_size = alloc_size |
298 | If first_chunk Then |
299 | sg = first_chunk |
300 | first_chunk = NULL |
301 | Else |
302 | sg = alloc_fn(alloc_size, gfp_mask) |
304 | If Value for the false possibility is greater at compile time(!sg) Then |
311 | If prv Then number of mapped entries = ++ original size of list |
314 | Return -ENOMEM |
336 | prv_max_ents = curr_max_ents |
337 | curr_max_ents = max_ents |
340 | Return 0 |
Name | Describe |
---|---|
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: |
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 |