函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Add an event to the group notification queue

函数原型:int fsnotify_add_event(struct fsnotify_group *group, struct fsnotify_event *event, int (*merge)(struct list_head *, struct fsnotify_event *))

返回类型:int

参数:

类型参数名称
struct fsnotify_group *group
struct fsnotify_event *event
int (*merge
89  ret等于0
90  list等于 list of event_holder this group needs to send to userspace
92  pr_debug("%s: group=%p event=%p\n", __func__, group, event)
94  加自旋锁
96  如果 group is being shut down, don't queue more events
97  自旋锁解锁
98  返回:2
101  如果event恒等于 Event we queue when the * notification list is too * full events on the queue 大于等于 maximum events allowed on the list
103  ret等于2
105  如果非链表为空
107  返回:ret
109  event等于 Event we queue when the * notification list is too * full
110  转到:queue
113  如果非链表为空merge
114  ret等于merge(list, event)
115  如果ret
117  返回:ret
121  queue :
122  events on the queue 自加
123  添加链表项
124  自旋锁解锁
126  wake_up( & read() on the notification file blocks on this waitq )
127  kill_fasync( & async notification , SIGIO, data input available )
128  返回:ret
调用者
名称描述
inotify_handle_event
fanotify_handle_event