Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_poll_add

Proto:static int io_poll_add(struct io_kiocb *req, struct io_kiocb **nxt)

Type:int

Parameter:

TypeParameterName
struct io_kiocb *req
struct io_kiocb **nxt
2740  poll = poll
2741  ctx = ctx
2743  bool cancel = false
2746  INIT_IO_WORK( & work, io_poll_complete_work)
2747  INIT_HLIST_NODE( & hash_node)
2749  head = NULL
2750  done = false
2751  canceled = false
2753  _qproc = io_poll_queue_proc
2754  _key = events
2755  req = req
2756  error = -EINVAL
2759  Initialization list head
2760  init_waitqueue_func_entry( & wait, io_poll_wake)
2761  private = poll
2763  Initialization list head
2765  mask = vfs_poll(file, & pt) & events
2767  spin_lock_irq( & completion_lock)
2768  If Value is more likely to compile time(head) Then
2769  spin_lock( & lock)
2771  If error Then cancel = true
2773  error = 0
2774  mask = 0
2776  If mask || error Then list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2778  Else if cancel Then WRITE_ONCE(canceled, true)
2780  Else if Not done Then io_poll_req_insert(req)
2782  spin_unlock( & lock)
2784  If mask Then
2785  error = 0
2786  io_poll_complete(req, mask, 0)
2788  spin_unlock_irq( & completion_lock)
2790  If mask Then
2791  io_cqring_ev_posted(ctx)
2792  Drop reference to request, return next in chain (if there is one) if this* was the last reference to this request.
2794  Return error
Caller
NameDescribe
io_issue_sqe