函数逻辑报告

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

函数名称:Add a fasync entry. Return negative on error, positive if* added, and zero if did nothing but change an existing one.

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

返回类型:int

参数:

类型参数名称
intfd
struct file *filp
struct fasync_struct **fapp
953  new等于fasync_alloc()
954  如果非new则返回:负ENOMEM
964  如果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".
965  NOTE! This can be used only for unused fasync entries:* entries that actually got inserted on the fasync list* need to be released by rcu - see fasync_remove_entry.
966  返回:0
969  返回:1
调用者
名称描述
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.