函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:54:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_poll_wake

函数原型:static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, void *key)

返回类型:int

参数:

类型参数名称
struct wait_queue_entry *wait
unsignedmode
intsync
void *key
2650  poll等于private
2651  req等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(poll, structio_kiocb, poll)
2652  ctx等于ctx
2653  mask等于key_to_poll(key)
2657  如果mask且非mask按位与events的值则返回:0
2660  删除链表项并重新初始化
2668  如果maskspin_trylock_irqsave( & completion_lock, flags)则
2671  从哈希表移除对象
2672  io_poll_complete(req, mask, 0)
2673  trigger_ev等于io_should_trigger_evfd(ctx)
2674  如果trigger_eveventfd_signal_count()则
2675  trigger_ev = false
2677  否则
2679  io_put_req(req)
2680  req = NULL
2682  spin_unlock_irqrestore( & completion_lock, flags)
2683  __io_cqring_ev_posted(ctx, trigger_ev)
2684  否则
2685  io_queue_async_work(req)
2688  返回:1