函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:55:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_sqe_alloc_file_tables

函数原型:static int io_sqe_alloc_file_tables(struct io_ring_ctx *ctx, unsigned nr_tables, unsigned nr_files)

返回类型:int

参数:

类型参数名称
struct io_ring_ctx *ctx
unsignednr_tables
unsignednr_files
4257 i小于nr_tables循环
4258  table等于* If used, fixed file set. Writers must ensure that ->refs is dead, * readers must ensure that ->refs is alive as long as the file* is * used. Only updated through io_uring_register(2).[i]
4261  this_files等于两数取小(nr_files, IORING_MAX_FILES_TABLE)
4262  files等于分配数组内存并置零
4264  如果非files退出
4266  nr_files减等于this_files
4269  如果i恒等于nr_tables则返回:0
4272 i小于nr_tables循环
4273  table等于* If used, fixed file set. Writers must ensure that ->refs is dead, * readers must ensure that ->refs is alive as long as the file* is * used. Only updated through io_uring_register(2).[i]
4274  释放内存
4276  返回:1
调用者
名称描述
io_sqe_files_register