函数逻辑报告

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

函数名称:Insert a new entry into the fasync list. Return the pointer to the* old one if we didn't use the new one.* NOTE! It is very important that the FASYNC flag always* match the state "is the filp on a fasync list".

函数原型:struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasync_struct **fapp, struct fasync_struct *new)

返回类型:struct fasync_struct

参数:

类型参数名称
intfd
struct file *filp
struct fasync_struct **fapp
struct fasync_struct *new
919  加自旋锁
920  加自旋锁
921  以(fa = * fp) != NULL循环
922  如果fa_file不等于filp则继续下一循环
925  write_lock_irq( & fa_lock)
926  fa_fd等于fd
927  write_unlock_irq( & fa_lock)
928  转到:out
931  rwlock_init( & fa_lock)
932  magic等于FASYNC_MAGIC
933  fa_file等于filp
934  fa_fd等于fd
935  singly linked list 等于fapp
936  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( * fapp, new)
937  f_flags或等于FASYNC
939  out :
940  自旋锁解锁
941  自旋锁解锁
942  返回:fa
调用者
名称描述
fasync_add_entryAdd a fasync entry. Return negative on error, positive if* added, and zero if did nothing but change an existing one.
lease_setup