函数逻辑报告 |
Source Code:fs\aio.c |
Create Date:2022-07-29 10:53:20 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:aio_setup_ring
函数原型:static int aio_setup_ring(struct kioctx *ctx, unsigned int nr_events)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kioctx * | ctx | |
unsigned int | nr_events |
470 | nr_events加等于2 |
479 | file等于aio_private_file(ctx, nr_pages) |
480 | 如果是错误则 |
481 | aio_ring_file = NULL |
482 | 返回:负ENOMEM |
485 | aio_ring_file等于file |
489 | ring_pages等于internal_pages |
490 | 如果nr_pages大于AIO_RING_PAGES则 |
505 | pr_debug("pid(%d) page[%d]->count=%d\n", pid, i, page_count(page)) |
507 | SetPageUptodate(page) |
510 | ring_pages[i]等于page |
514 | 如果此条件成立可能性小(为编译器优化)(i != nr_pages)则 |
515 | aio_free_ring(ctx) |
516 | 返回:负ENOMEM |
522 | 如果lock for writing则 |
528 | mmap_base等于do_mmap_pgoff(aio_ring_file, 0, mmap_size, page can be read | page can be written , Share changes , 0, & unused, NULL) |
532 | 如果是错误则 |
543 | ring等于kmap_atomic(ring_pages[0]) |
544 | number of io_events 等于nr_events |
545 | kernel internal index number 等于0U的反 |
547 | magic等于AIO_RING_MAGIC |
550 | size of aio_ring 等于sizeof(structaio_ring) |
551 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(ring) |
552 | flush_dcache_page(ring_pages[0]) |
554 | 返回:0 |
名称 | 描述 |
---|---|
ioctx_alloc | x_alloc* Allocates and initializes an ioctx. Returns an ERR_PTR if it failed. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |