| Function report | 
| Source Code: fs\io_uring.c | Create Date:2022-07-28 20:22:08 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:io_ring_ctx_alloc
Proto:static struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)
Type:struct io_ring_ctx
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct io_uring_params * | p | 
| 505 | ctx = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 506 | If Not ctx Then Return NULL | 
| 510 | If Not if all else fails... Then Go to err | 
| 514 | If Not 0 is for ctx quiesce/reinit/free, 1 is for sqo_thread started Then Go to err | 
| 522 | hash_bits -= 5 | 
| 525 | cancel_hash_bits = hash_bits | 
| 526 | cancel_hash = Allocation memory | 
| 528 | If Not cancel_hash Then Go to err | 
| 530 | __hash_init(cancel_hash, 1U << hash_bits) | 
| 537 | init_waitqueue_head( & cq_wait) | 
| 541 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & uring_lock) | 
| 542 | init_waitqueue_head( & wait) | 
| 547 | init_waitqueue_head( & inflight_wait) | 
| 550 | Return ctx | 
| 551 | err : | 
| 552 | If if all else fails... Then kmem_cache_free(req_cachep, if all else fails... ) | 
| 555 | kfree(cancel_hash) | 
| 557 | Return NULL | 
| Name | Describe | 
|---|---|
| io_uring_create | 
| 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 |