函数逻辑报告 | 
Source Code:mm\swapfile.c | 
Create Date:2022-07-27 16:47:09 | 
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Try to get a swap entry from current cpu's swap entry pool (a cluster). This* might involve allocating a new cluster for current CPU too.
函数原型:static bool scan_swap_map_try_ssd_cluster(struct swap_info_struct *si, unsigned long *offset, unsigned long *scan_base)
返回类型:bool
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct swap_info_struct * | si | |
| unsigned long * | offset | |
| unsigned long * | scan_base | 
| 607 | new_cluster : | 
| 609 | 如果cluster_is_null( & Current cluster index )则 | 
| 610 | 如果非cluster_list_empty( & clusters list )则 | 
| 611 | Current cluster index 等于head | 
| 614 | 否则如果非cluster_list_empty( & discard clusters list )则 | 
| 621 | 转到:new_cluster | 
| 622 | 否则返回:false | 
| 626 | found_free = false | 
| 636 | cluster_set_null( & Current cluster index ) | 
| 637 | 转到:new_cluster | 
| 639 | ci等于lock_cluster(si, tmp) | 
| 647 | unlock_cluster(ci) | 
| 648 | 如果非found_free则 | 
| 649 | cluster_set_null( & Current cluster index ) | 
| 650 | 转到:new_cluster | 
| 652 | Likely next allocation offset 等于tmp加1 | 
| 655 | 返回:found_free | 
| 名称 | 描述 | 
|---|---|
| scan_swap_map_slots | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |