| 函数逻辑报告 | 
| Source Code: fs\file.c | Create Date:2022-07-29 10:38:43 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Expand files.* This function will expand the file structures, if the requested size exceeds* the current capacity and there is room for expansion.* Return <0 error code on error; 0 when nothing done; 1 when files were
函数原型:static int expand_files(struct files_struct *files, unsigned int nr)__releases(files->file_lock) __acquires(files->file_lock)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct files_struct * | files | |
| unsigned int | nr | 
| 198 | expanded等于0 | 
| 200 | repeat : | 
| 201 | fdt等于files_fdtable(files) | 
| 208 | 如果nr大于等于sysctl_nr_open则返回:负EMFILE | 
| 211 | 如果此条件成立可能性小(为编译器优化)(resize_in_progress)则 | 
| 212 | 自旋锁解锁 | 
| 213 | expanded等于1 | 
| 215 | 加自旋锁 | 
| 216 | 转到:repeat | 
| 220 | resize_in_progress = true | 
| 221 | expanded等于Expand the file descriptor table.* This function will allocate a new fdtable and both fd array and fdset, of* the given size.* Return <0 error code on error; 1 on successful completion. | 
| 222 | resize_in_progress = false | 
| 224 | wake_up_all( & resize_wait) | 
| 225 | 返回:expanded | 
| 名称 | 描述 | 
|---|---|
| __alloc_fd | allocate a file descriptor, mark it busy. | 
| replace_fd | |
| ksys_dup3 | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |