Skip to contentSkip to conversation

epoll keyed wakeups - make eventfd use keyed wakeups

PATCH In review Davide Libenzi 1 participant 1 message Jan 31, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 6/7 epoll keyed wakeups - make eventfd use keyed wakeups

The following patch introduces keyed event wakeups inside the eventfd code.

- Davide

---
 fs/eventfd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/eventfd.c +3 -3
Index: linux-2.6.mod/fs/eventfd.c
===================================================================
@@ -50,7 +50,7 @@ int eventfd_signal(struct file *file, in
 		n = (int) (ULLONG_MAX - ctx->count);
 	ctx->count += n;
 	if (waitqueue_active(&ctx->wqh))
-		wake_up_locked(&ctx->wqh);
+		kwake_up_locked(&ctx->wqh, POLLIN);
 	spin_unlock_irqrestore(&ctx->wqh.lock, flags);
 
 	return n;
@@ -120,7 +120,7 @@ static ssize_t eventfd_read(struct file 
 	if (res > 0) {
 		ctx->count = 0;
 		if (waitqueue_active(&ctx->wqh))
-			wake_up_locked(&ctx->wqh);
+			kwake_up_locked(&ctx->wqh, POLLOUT);
 	}
 	spin_unlock_irq(&ctx->wqh.lock);
 	if (res > 0 && put_user(ucnt, (__u64 __user *) buf))
@@ -169,7 +169,7 @@ static ssize_t eventfd_write(struct file
 	if (res > 0) {
 		ctx->count += ucnt;
 		if (waitqueue_active(&ctx->wqh))
-			wake_up_locked(&ctx->wqh);
+			kwake_up_locked(&ctx->wqh, POLLIN);
 	}
 	spin_unlock_irq(&ctx->wqh.lock);