函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Remove a fasync entry. If successfully removed, return* positive and clear the FASYNC flag. If no entry exists,* do nothing and return 0.* NOTE! It is very important that the FASYNC flag always* match the state "is the filp on a fasync list".

函数原型:int fasync_remove_entry(struct file *filp, struct fasync_struct **fapp)

返回类型:int

参数:

类型参数名称
struct file *filp
struct fasync_struct **fapp
870  result等于0
872  加自旋锁
873  加自旋锁
874  以(fa = * fp) != NULL循环
875  如果fa_file不等于filp则继续下一循环
878  write_lock_irq( & fa_lock)
879  fa_file = NULL
880  write_unlock_irq( & fa_lock)
882  fp等于 singly linked list
883  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.
884  f_flags与等于FASYNC的反
885  result等于1
886  退出
888  自旋锁解锁
889  自旋锁解锁
890  返回:result
调用者
名称描述
fasync_helperasync_helper() is used by almost all character device drivers* to set up the fasync queue, and for regular files by the file* lease code. It returns negative on error, 0 if it did no changes* and positive if it added/deleted the entry.