函数逻辑报告 |
Source Code:fs\io_uring.c |
Create Date:2022-07-29 10:55:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:io_uring_create
函数原型:static int io_uring_create(unsigned entries, struct io_uring_params *p)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned | entries | |
struct io_uring_params * | p |
5318 | struct user_struct * user = NULL |
5323 | 如果非entries或entries大于IORING_MAX_ENTRIES则返回:负EINVAL |
5335 | 如果flags按位与app defines CQ size 则 |
5341 | 如果cq_entries小于sq_entries或cq_entries大于IORING_MAX_CQ_ENTRIES则返回:负EINVAL |
5344 | 否则 |
5345 | cq_entries等于2乘sq_entries |
5348 | user等于get_uid(current_user()) |
5349 | account_mem等于非操作权限检查 |
5351 | 如果account_mem则 |
5352 | ret等于io_account_mem(user, ring_pages(sq_entries, cq_entries)) |
5354 | 如果ret则 |
5360 | ctx等于io_ring_ctx_alloc(p) |
5361 | 如果非ctx则 |
5362 | 如果account_mem则io_unaccount_mem(user, ring_pages(sq_entries, cq_entries)) |
5366 | 返回:负ENOMEM |
5368 | compat等于in_compat_syscall() |
5369 | account_mem等于account_mem |
5373 | ret等于io_allocate_scq_urings(ctx, p) |
5377 | ret等于io_sq_offload_start(ctx, p) |
5384 | ring_mask等于offsetof(structio_rings, sq_ring_mask) |
5385 | ring_entries等于offsetof(structio_rings, sq_ring_entries) |
5387 | dropped等于offsetof(structio_rings, sq_dropped) |
5393 | ring_mask等于offsetof(structio_rings, cq_ring_mask) |
5394 | ring_entries等于offsetof(structio_rings, cq_ring_entries) |
5395 | overflow等于offsetof(structio_rings, cq_overflow) |
5409 | 返回:ret |
5410 | err : |
5411 | io_ring_ctx_wait_and_kill(ctx) |
5412 | 返回:ret |
名称 | 描述 |
---|---|
io_uring_setup | Sets up an aio uring context, and returns the fd. Applications asks for a* ring size, we return the actual sq/cq ring sizes (among other things) in the* params structure passed in. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |