函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Removes a "struct epitem" from the eventpoll RB tree and deallocates* all the associated resources. Must be called with "mtx" held.

函数原型:static int ep_remove(struct eventpoll *ep, struct epitem *epi)

返回类型:int

参数:

类型参数名称
struct eventpoll *ep
struct epitem *epi
755  file等于file
757  lockdep_assert_irqs_enabled()
762  This function unregisters poll callbacks from the associated file* descriptor. Must be called with "mtx" held (or "epmutex" if called from* ep_free).
765  加自旋锁
766  删除不需要重新初始化的列表项
767  自旋锁解锁
769  rb_erase_cached( & RB tree node links this structure to the eventpoll RB tree , & RB tree root used to store monitored fd structs )
771  write_lock_irq( & Lock which protects rdllist and ovflist )
772  如果Tells us if the item is currently linked 删除链表项并重新初始化
774  write_unlock_irq( & Lock which protects rdllist and ovflist )
776  wakeup_source_unregister(all only when ep->mtx is held )
784  Post an RCU callback to be invoked after the end of an RCU grace* period. But since we have but one CPU, that would be after any* quiescent state.
786  atomic_long_dec( & The number of file descriptors currently watched )
788  返回:0
调用者
名称描述
ep_free
eventpoll_release_fileThis is called from eventpoll_release() to unlink files from the eventpoll* interface. We need to have this facility to cleanup correctly files that are* closed without being removed from the eventpoll interface.
SYSCALL_DEFINE4The following function implements the controller interface for* the eventpoll file that enables the insertion/removal/change of* file descriptors inside the interest set.