Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_iopoll_check

Proto:static int io_iopoll_check(struct io_ring_ctx *ctx, unsigned *nr_events, long min)

Type:int

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
unsigned *nr_events
longmin
1292  iters = 0 , ret = 0
1299  mutex_lock( & uring_lock)
1300  Do
1301  tmin = 0
1308  If io_cqring_events(ctx, false) Then Break
1321  If Not (++iters & 7) Then
1323  mutex_lock( & uring_lock)
1326  If nr_events < min Then tmin = min - nr_events
1329  ret = Poll for a minimum of 'min' events. Note that if min == 0 we consider that a* non-spinning poll check - we'll still enter the driver poll loop, but only* as a non-spinning completion check.
1330  If ret <= 0 Then Break
1332  ret = 0
1333  When min && Not nr_events && Not need_resched() cycle
1335  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.
1336  Return ret
Caller
NameDescribe
SYSCALL_DEFINE6