Function report |
Source Code:fs\io_uring.c |
Create Date:2022-07-28 20:22:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:io_uring_create
Proto:static int io_uring_create(unsigned entries, struct io_uring_params *p)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned | entries | |
struct io_uring_params * | p |
5318 | struct user_struct * user = NULL |
5323 | If Not entries || entries > IORING_MAX_ENTRIES Then Return -EINVAL |
5335 | If flags & app defines CQ size Then |
5341 | If cq_entries < sq_entries || cq_entries > IORING_MAX_CQ_ENTRIES Then Return -EINVAL |
5344 | Else |
5345 | cq_entries = 2 * sq_entries |
5348 | user = get_uid(current_user()) |
5349 | account_mem = Not Check operation authority |
5351 | If account_mem Then |
5352 | ret = io_account_mem(user, ring_pages(sq_entries, cq_entries)) |
5354 | If ret Then |
5360 | ctx = io_ring_ctx_alloc(p) |
5361 | If Not ctx Then |
5362 | If account_mem Then io_unaccount_mem(user, ring_pages(sq_entries, cq_entries)) |
5366 | Return -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 | Return ret |
5410 | err : |
5411 | io_ring_ctx_wait_and_kill(ctx) |
5412 | Return ret |
Name | Describe |
---|---|
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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |