Skip to content

Backport !3621 “wakeup: do single read when using eventfd()” to glib-2-78

Previously, this would loop as long as read() got the expected number of bytes back, which is 8. That means every successful read() of the eventfd would perform an additional syscall() as a followup.

This is not ideal because eventfd (unless used as an EFD_SEMAPHORE) will reset the counter as part of the read(). So that means that we either do an additional throw-away syscall() or potentially race against a producer generating new events before this change.


Trivial backport of !3621 (merged) to glib-2-78.

Merge request reports