Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__io_uring_register

Proto: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)

Type:int

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
unsignedopcode
void __user *arg
unsignednr_args
5465  If 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 Then Return -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  Case opcode == _uring_register(2) opcodes and arguments
5483  ret = io_sqe_buffer_register(ctx, arg, nr_args)
5484  Break
5485  Case opcode == IORING_UNREGISTER_BUFFERS
5486  ret = -EINVAL
5487  If arg || nr_args Then Break
5489  ret = io_sqe_buffer_unregister(ctx)
5490  Break
5491  Case opcode == IORING_REGISTER_FILES
5492  ret = io_sqe_files_register(ctx, arg, nr_args)
5493  Break
5494  Case opcode == IORING_UNREGISTER_FILES
5495  ret = -EINVAL
5496  If arg || nr_args Then Break
5498  ret = io_sqe_files_unregister(ctx)
5499  Break
5500  Case opcode == IORING_REGISTER_FILES_UPDATE
5501  ret = io_sqe_files_update(ctx, arg, nr_args)
5502  Break
5503  Case opcode == IORING_REGISTER_EVENTFD
5504  Case opcode == IORING_REGISTER_EVENTFD_ASYNC
5505  ret = -EINVAL
5506  If nr_args != 1 Then Break
5508  ret = io_eventfd_register(ctx, arg)
5509  If ret Then Break
5511  If opcode == IORING_REGISTER_EVENTFD_ASYNC Then eventfd_async = 1
5513  Else eventfd_async = 0
5515  Break
5516  Case opcode == IORING_UNREGISTER_EVENTFD
5517  ret = -EINVAL
5518  If arg || nr_args Then Break
5520  ret = io_eventfd_unregister(ctx)
5521  Break
5522  Default
5523  ret = -EINVAL
5524  Break
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  Return ret
Caller
NameDescribe
SYSCALL_DEFINE4