File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ struct eventfd_ctx {
33
33
/*
34
34
* Every time that a write(2) is performed on an eventfd, the
35
35
* value of the __u64 being written is added to "count" and a
36
- * wakeup is performed on "wqh". A read(2) will return the "count"
37
- * value to userspace, and will reset "count" to zero. The kernel
38
- * side eventfd_signal() also, adds to the "count" counter and
39
- * issue a wakeup.
36
+ * wakeup is performed on "wqh". If EFD_SEMAPHORE flag was not
37
+ * specified, a read(2) will return the "count" value to userspace,
38
+ * and will reset "count" to zero. The kernel side eventfd_signal()
39
+ * also, adds to the "count" counter and issue a wakeup.
40
40
*/
41
41
__u64 count ;
42
42
unsigned int flags ;
@@ -301,6 +301,8 @@ static void eventfd_show_fdinfo(struct seq_file *m, struct file *f)
301
301
(unsigned long long )ctx -> count );
302
302
spin_unlock_irq (& ctx -> wqh .lock );
303
303
seq_printf (m , "eventfd-id: %d\n" , ctx -> id );
304
+ seq_printf (m , "eventfd-semaphore: %d\n" ,
305
+ !!(ctx -> flags & EFD_SEMAPHORE ));
304
306
}
305
307
#endif
306
308
You can’t perform that action at this time.
0 commit comments