summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-06-10 15:16:16 +0200
committerJiri Kosina <jkosina@suse.cz>2012-06-18 13:42:00 +0200
commitd937ae5fae17e63aaa97f029be221a6516b25475 (patch)
tree2ef5c99a73fe3d9c9ef2e85bdf72d0807b170d5b /tools
parent1f9dec1e0164b48da9b268a02197f38caa69b118 (diff)
downloadlinux-stable-d937ae5fae17e63aaa97f029be221a6516b25475.tar.gz
linux-stable-d937ae5fae17e63aaa97f029be221a6516b25475.tar.bz2
linux-stable-d937ae5fae17e63aaa97f029be221a6516b25475.zip
HID: uhid: implement read() on uhid devices
User-space can use read() to get a single event from uhid devices. read() does never return multiple events. This allows us to extend the event structure and still keep backwards compatibility. If user-space wants to get multiple events in one syscall, they should use the readv()/writev() syscalls which are supported by uhid. This introduces a new lock which helps us synchronizing simultaneous reads from user-space. We also correctly return -EINVAL/-EFAULT only on errors and retry the read() when some other thread captured the event faster than we did. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions