Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:SYSCALL_DEFINE6

Proto:SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, unsigned int, to_submit, unsigned int, min_complete, unsigned int, flags, const sigset_t __user *, sig, size_t, sigsz)

Type:

Parameter:Nothing

5153  ret = -EBADF
5154  submitted = 0
5157  If flags & ~(_uring_enter(2) flags | IORING_ENTER_SQ_WAKEUP) Then Return -EINVAL
5160  f = fdget(fd)
5161  If Not file Then Return -EBADF
5164  ret = -EOPNOTSUPP
5165  If f_op != io_uring_fops Then Go to out_fput
5168  ret = -ENXIO
5169  ctx = needed for tty driver, and maybe others
5170  If Not percpu_ref_tryget - try to increment a percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless its count already reached zero.* Returns %true on success; %false on failure. Then Go to out_fput
5178  ret = 0
5179  If flags & SQ poll thread Then
5180  If Not list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using Then Returns true if there are no backlogged entries after the flush
5182  If flags & IORING_ENTER_SQ_WAKEUP Then wake_up( & sqo_wait)
5184  submitted = to_submit
5185  Else if to_submit Then
5188  to_submit = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(to_submit, sq_entries)
5189  mutex_lock( & uring_lock)
5191  cur_mm = sqo_mm
5192  submitted = io_submit_sqes(ctx, to_submit, file, fd, & cur_mm, false)
5194  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.
5196  If submitted != to_submit Then Go to out
5199  If flags & _uring_enter(2) flags Then
5200  nr_events = 0
5202  min_complete = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(min_complete, cq_entries)
5204  If flags & _context is polled Then
5206  Else
5211  out :
5212  percpu_ref_put - decrement a percpu refcount*@ref: percpu_ref to put* Decrement the refcount, and if 0, call the release function (which was passed* to percpu_ref_init())* This function is safe to call as long as @ref is between init and exit.
5213  out_fput :
5214  fdput(f)
5215  Return If submitted Then submitted Else ret