Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Wait until events become available, if we don't already have some. The* application must reap them itself, as they reside on the shared cq ring.

Proto:static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, const sigset_t __user *sig, size_t sigsz)

Type:int

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
intmin_events
const sigset_t __user *sig
size_tsigsz
4025  struct io_wait_queue iowq = {wq = {private = current process, func = io_wake_function, entry = Simple doubly linked list implementation(entry), }, ctx = ctx, to_wait = min_events, }
4034  rings = rings
4035  ret = 0
4037  If io_cqring_events(ctx, false) >= min_events Then Return 0
4040  If sig Then
4042  If in_compat_syscall() Then ret = set_compat_user_sigmask((constcompat_sigset_t__user * )sig, sigsz)
4045  Else ret = The api helps set app-provided sigmasks
4049  If ret Then Return ret
4053  nr_timeouts = atomic_read( & cq_timeouts)
4054  _uring_cqring_wait - called before start waiting for an available CQE*@ctx: pointer to a ring context structure*@min_events: minimal number of events to wait for* Allows to track waiting for CQE, so that we can e
4055  Do
4056  prepare_to_wait_exclusive( & wait, & wq, TASK_INTERRUPTIBLE)
4058  If io_should_wake( & iowq, false) Then Break
4060  schedule()
4062  ret = -EINTR
4063  Break
4065  When 1 cycle
4066  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
4068  restore_saved_sigmask_unless(ret == - EINTR)
4070  Return If READ_ONCE(head) == READ_ONCE(tail) Then ret Else 0
Caller
NameDescribe
SYSCALL_DEFINE6