函数逻辑报告

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

函数名称:ep_free

函数原型:static void ep_free(struct eventpoll *ep)

返回类型:void

参数:

类型参数名称
struct eventpoll *ep
797  如果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_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 rbp循环
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  当((rbp = Same as rb_first(), but O(1) ( & RB tree root used to store monitored fd structs )) != NULL)循环
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  释放内存
调用者
名称描述
ep_eventpoll_release
do_epoll_createOpen an eventpoll file descriptor.