Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:eventfd_ctx_do_read

Proto:static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)

Type:void

Parameter:

TypeParameterName
struct eventfd_ctx *ctx
__u64 *cnt
186  cnt = If flags & CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining* new flags, since they might collide with O_* ones. We want* to re-use O_* flags that couldn't possibly have a meaning* from eventfd, in order to leave a free define-space for* shared O_* flags. Then 1 Else * 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
187  * 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 -= cnt
Caller
NameDescribe
eventfd_ctx_remove_wait_queueventfd_ctx_remove_wait_queue - Read the current counter and removes wait queue
eventfd_read