Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fcntl.c Create Date:2022-07-28 20:06:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static int fasync_add_entry(int fd, struct file *filp, struct fasync_struct **fapp)

Type:int

Parameter:

TypeParameterName
intfd
struct file *filp
struct fasync_struct **fapp
953  new = fasync_alloc()
954  If Not new Then Return -ENOMEM
964  If 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". Then
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  Return 0
969  Return 1
Caller
NameDescribe
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.