From: Davide Libenzi Date: Tue, 15 May 2007 08:40:41 +0000 (-0700) Subject: fix epoll single pass code and add wait-exclusive flag X-Git-Tag: v2.6.22-rc2~107 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47de16c7221968d3eab899d7540efa5ba77af5a;p=pandora-kernel.git fix epoll single pass code and add wait-exclusive flag Fixes the epoll single pass code. During the unlocked event delivery (to userspace) code, the poll callback can re-issue new events, and we must receive them correctly. Since we loop in a lockless fashion, we want to be O(nready), and we don't want to flash on/off the spinlock for every event, we have the poll callback to use a secondary list to queue events while we're inside the event delivery loop. The rw_semaphore has been turned into a mutex. This patch also adds the wait-exclusive flag, as suggested by Davi Arnaut. Signed-off-by: Davide Libenzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed