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:ep_free

Proto:static void ep_free(struct eventpoll *ep)

Type:void

Parameter:

TypeParameterName
struct eventpoll *ep
797  If waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_ Then ep_poll_safewake( & Wait queue used by file->poll() )
808  mutex_lock( & This mutex is used to serialize ep_free() and eventpoll_release_file().)
813  When rbp cycle
814  epi = rb_entry(rbp, structepitem, rbn)
816  This function unregisters poll callbacks from the associated file* descriptor. Must be called with "mtx" held (or "epmutex" if called from* ep_free).
817  cond_resched()
828  mutex_lock( & * This mutex is used to ensure that files are not removed * while epoll is using them. This is held during the event * collection loop, the file cleanup path, the epoll file exit * code and the ctl operations.)
829  When ((rbp = Same as rb_first(), but O(1) ( & RB tree root used to store monitored fd structs )) != NULL) cycle
830  epi = rb_entry(rbp, structepitem, rbn)
831  Removes a "struct epitem" from the eventpoll RB tree and deallocates* all the associated resources. Must be called with "mtx" held.
832  cond_resched()
834  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.
836  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.
837  mutex_destroy( & * This mutex is used to ensure that files are not removed * while epoll is using them. This is held during the event * collection loop, the file cleanup path, the epoll file exit * code and the ctl operations.)
838  free_uid( The user that created the eventpoll descriptor )
839  wakeup_source_unregister( wakeup_source used when ep_scan_ready_list is running )
840  kfree(ep)
Caller
NameDescribe
ep_eventpoll_release
do_epoll_createOpen an eventpoll file descriptor.