函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__io_uring_register

函数原型:static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode, void __user *arg, unsigned nr_args)__releases(ctx->uring_lock) __acquires(ctx->uring_lock)

返回类型:int

参数:

类型参数名称
struct io_ring_ctx *ctx
unsignedopcode
void __user *arg
unsignednr_args
5465  如果percpu_ref_is_dying - test whether a percpu refcount is dying or dead*@ref: percpu_ref to test* Returns %true if @ref is dying or dead.* This function is safe to call as long as @ref is between init and exit则返回:负ENXIO
5468  percpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters
5477  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
5478  wait_for_completion: - waits for completion of a task*@x: holds the state of this particular completion* This waits to be signaled for completion of a specific task. It is NOT* interruptible and there is no timeout.* See also similar routines (i
5479  mutex_lock( & uring_lock)
5482  :opcode恒等于_uring_register(2) opcodes and arguments
5483  ret等于io_sqe_buffer_register(ctx, arg, nr_args)
5484  退出
5485  :opcode恒等于IORING_UNREGISTER_BUFFERS
5486  ret等于负EINVAL
5487  如果argnr_args退出
5489  ret等于io_sqe_buffer_unregister(ctx)
5490  退出
5491  :opcode恒等于IORING_REGISTER_FILES
5492  ret等于io_sqe_files_register(ctx, arg, nr_args)
5493  退出
5494  :opcode恒等于IORING_UNREGISTER_FILES
5495  ret等于负EINVAL
5496  如果argnr_args退出
5498  ret等于io_sqe_files_unregister(ctx)
5499  退出
5500  :opcode恒等于IORING_REGISTER_FILES_UPDATE
5501  ret等于io_sqe_files_update(ctx, arg, nr_args)
5502  退出
5503  :opcode恒等于IORING_REGISTER_EVENTFD
5504  :opcode恒等于IORING_REGISTER_EVENTFD_ASYNC
5505  ret等于负EINVAL
5506  如果nr_args不等于1则退出
5508  ret等于io_eventfd_register(ctx, arg)
5509  如果ret退出
5511  如果opcode恒等于IORING_REGISTER_EVENTFD_ASYNCeventfd_async等于1
5513  否则eventfd_async等于0
5515  退出
5516  :opcode恒等于IORING_UNREGISTER_EVENTFD
5517  ret等于负EINVAL
5518  如果argnr_args退出
5520  ret等于io_eventfd_unregister(ctx)
5521  退出
5522  默认
5523  ret等于负EINVAL
5524  退出
5528  _completion - reinitialize a completion structure*@x: pointer to completion structure that is to be reinitialized* This inline function should be used to reinitialize a completion structure so it can* be reused
5529  percpu_ref_reinit - re-initialize a percpu refcount*@ref: perpcu_ref to re-initialize* Re-initialize @ref so that it's in the same state as when it finished* percpu_ref_init() ignoring %PERCPU_REF_INIT_DEAD. @ref must have been
5530  返回:ret
调用者
名称描述
SYSCALL_DEFINE4