cbus: use a more reliable test to check whether we need a syscall
Check ev_async_pending() rather than state of the pipe to find out whether we need a syscall. On a simple read-only test pipe->pipe is empty while there is already a pending event more than a few times a millisecond. At the same time, checking ev_async_pending() is more expensive, since it's an atomic variable, but overall performance increased after the patch, so the cost seems to be justified.
Please register or sign in to comment