]> git.karo-electronics.de Git - karo-tx-linux.git/commit
epoll: support for disabling items, and a self-test app
authorPaton J. Lewis <palewis@adobe.com>
Fri, 28 Sep 2012 00:20:30 +0000 (10:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:01:28 +0000 (14:01 +1000)
commit021f4a4c22696121a6ea2ff0ec4677a80e0bfc60
tree70592f2e03a4608b8c76d77093974b9565d4d19c
parentd02210ad3b96cc09b012a3e6f0b0128c38dc38fd
epoll: support for disabling items, and a self-test app

Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll
item.  If epoll_ctl doesn't return -EBUSY in this case, it is then safe to
delete the epoll item in a multi-threaded environment.  Also added a new
test_epoll self- test app to both demonstrate the need for this feature
and test it.

Signed-off-by: Paton J. Lewis <palewis@adobe.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Paul Holland <pholland@adobe.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/eventpoll.c
include/linux/eventpoll.h
tools/testing/selftests/Makefile
tools/testing/selftests/epoll/Makefile [new file with mode: 0644]
tools/testing/selftests/epoll/test_epoll.c [new file with mode: 0644]