函数逻辑报告 | 
Source Code:lib\genalloc.c | 
Create Date:2022-07-27 07:54:03 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:gen_pool_add_owner- add a new chunk of special memory to the pool*@pool: pool to add new memory chunk to*@virt: virtual starting address of memory chunk to add to pool*@phys: physical starting address of memory chunk to add to pool*@size: size in bytes of
函数原型:int gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct gen_pool * | pool | |
| unsigned long | virt | |
| phys_addr_t | phys | |
| size_t | size | |
| int | nid | |
| void * | owner | 
| 186 | nbits等于size右移 minimum allocation order 位 | 
| 187 | nbytes等于sizeof(structgen_pool_chunk)加BITS_TO_LONGS(nbits)乘sizeof(long) | 
| 190 | chunk等于vzalloc_node(nbytes, nid) | 
| 191 | 如果此条件成立可能性小(为编译器优化)(chunk == NULL)则返回:负ENOMEM | 
| 198 | atomic_long_set( & avail, size) | 
| 200 | 加自旋锁 | 
| 201 | 添加RCU保护项 | 
| 202 | 自旋锁解锁 | 
| 204 | 返回:0 | 
| 名称 | 描述 | 
|---|---|
| gen_pool_add_virt | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |