Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int ep_remove(struct eventpoll *ep, struct epitem *epi)

Type:int

Parameter:

TypeParameterName
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  spin_lock( & * Protects f_ep_links, f_flags. * Must not be taken from IRQ context.)
766  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
767  spin_unlock( & * Protects f_ep_links, f_flags. * Must not be taken from IRQ context.)
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  If Tells us if the item is currently linked Then list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
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  Return 0
Caller
NameDescribe
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.