函数逻辑报告 |
Source Code:mm\madvise.c |
Create Date:2022-07-27 16:43:16 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:The madvise(2) system call
函数原型:SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
返回类型:
参数:无
1051 | unmapped_error等于0 |
1059 | 如果非madvise_behavior_valid(behavior)则返回:error |
1074 | error等于0 |
1079 | 如果(behavior == poison a page for testing || behavior == soft offline page for testing )则返回:Error injection support for memory error handling. |
1083 | write等于Any behaviour which results in changes to the vma->vm_flags needs to* take mmap_sem for writing. Others, which simply traverse vmas, need* to only take it for reading. |
1084 | 如果write则 |
1085 | 如果lock for writing则返回:负EINTR |
1087 | 否则 |
1088 | lock for reading |
1097 | 如果vma且start大于Our start address within vm_mm. 则prev等于vma |
1100 | blk_start_plug( & plug) |
1101 | 循环 |
1108 | 如果start小于Our start address within vm_mm. 则 |
1125 | 如果prev且start小于The first byte after our end addresswithin vm_mm. 则start等于The first byte after our end addresswithin vm_mm. |
1127 | error等于unmapped_error |
1135 | out : |
1136 | blk_finish_plug( & plug) |
1137 | 如果write则lease a write lock |
1139 | 否则lease a read lock |
1142 | 返回:error |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |