epoll: support for disabling items, and a self-test app
authorPaton J. Lewis <[email protected]>
Fri, 5 Oct 2012 00:13:39 +0000 (17:13 -0700)
committerLinus Torvalds <[email protected]>
Fri, 5 Oct 2012 18:05:00 +0000 (03:05 +0900)
commit03a7beb55b9fad363f0dd33e72ccf2d3e1c2a406
treee89cb2a2db5645600f28699ebf3b4a98195a3fb3
parenta0a0a7a94c765f7219b57fa3b79389901bb0bc99
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 <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Jason Baron <[email protected]>
Cc: Paul Holland <[email protected]>
Cc: Davide Libenzi <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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]