diff options
author | Adam Jackson <ajax@redhat.com> | 2009-02-23 16:01:14 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-02-23 16:01:14 -0500 |
commit | 75af278861dcd96124544d3c2889028578708317 (patch) | |
tree | 0d4640c5ad80f0edec60e418fe498fa91cf1ceb6 /test/btn0.c | |
parent | Revert "Remove useless include directive." (diff) | |
download | xf86-input-evdev-75af278861dcd96124544d3c2889028578708317.tar.gz xf86-input-evdev-75af278861dcd96124544d3c2889028578708317.tar.bz2 xf86-input-evdev-75af278861dcd96124544d3c2889028578708317.zip |
Open with O_NONBLOCK, and simplify EvdevReadInput to match.
xf86WaitForInput() would call select() with zero timeout to discover if
more input was ready. But we know that's always true at least once,
since we're only ever called from the sigio handler (if silken is
active) or from the main loop (if it's not and we selected readable).
With nonblocking IO we can just spin around until we hit EAGAIN, which
gets us down to n+1 syscalls per event instead of 2n.
Diffstat (limited to 'test/btn0.c')
0 files changed, 0 insertions, 0 deletions