Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_eventfd

Proto:static int do_eventfd(unsigned int count, int flags)

Type:int

Parameter:

TypeParameterName
unsigned intcount
intflags
412  BUILD_BUG_ON - break compile if a condition is true(EFD_CLOEXEC != O_CLOEXEC)
413  BUILD_BUG_ON - break compile if a condition is true(EFD_NONBLOCK != O_NONBLOCK)
415  If flags & ~EFD_FLAGS_SET Then Return -EINVAL
418  ctx = Allocation memory
419  If Not ctx Then Return -ENOMEM
422  kref_init - initialize object.*@kref: object in question.
423  init_waitqueue_head( & wqh)
424  * Every time that a write(2) is performed on an eventfd, the * value of the __u64 being written is added to "count" and a * wakeup is performed on "wqh". A read(2) will return the "count" * value to userspace, and will reset "count" to zero. The kernel * s = count
425  flags = flags
426  id = ida_simple_get( & eventfd_ida, 0, 0, GFP_KERNEL)
428  fd = anon_inode_getfd - creates a new file instance by hooking it up to an* anonymous inode, and a dentry that describe the "class"* of the file*@name: [in] name of the "class" of the new file*@fops: [in] file operations for the new file*@priv: [in] private
430  If fd < 0 Then eventfd_free_ctx(ctx)
433  Return fd
Caller
NameDescribe
SYSCALL_DEFINE2
SYSCALL_DEFINE1