aboutsummaryrefslogtreecommitdiff
path: root/test/fakedev.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-02-23 16:01:14 -0500
committerAdam Jackson <ajax@redhat.com>2009-02-23 16:01:14 -0500
commit75af278861dcd96124544d3c2889028578708317 (patch)
tree0d4640c5ad80f0edec60e418fe498fa91cf1ceb6 /test/fakedev.c
parentRevert "Remove useless include directive." (diff)
downloadxf86-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/fakedev.c')
0 files changed, 0 insertions, 0 deletions