aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2009-03-31 18:24:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:20 -0400
commit395108880efff4a4ffa1ffa554477f7f5ba6a031 (patch)
tree7d5797145d54b6cd8752eb2a6b1fd934336a005f
parent2dfa4eeab0fc7e8633974f2770945311b31eedf6 (diff)
epoll keyed wakeups: make eventfd use keyed wakeups
Introduce keyed event wakeups inside the eventfd code. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: William Lee Irwin III <wli@movementarian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/eventfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 91c0829a7035..2a701d593d35 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -51,7 +51,7 @@ int eventfd_signal(struct file *file, int n)
51 n = (int) (ULLONG_MAX - ctx->count); 51 n = (int) (ULLONG_MAX - ctx->count);
52 ctx->count += n; 52 ctx->count += n;
53 if (waitqueue_active(&ctx->wqh)) 53 if (waitqueue_active(&ctx->wqh))
54 wake_up_locked(&ctx->wqh); 54 wake_up_locked_poll(&ctx->wqh, POLLIN);
55 spin_unlock_irqrestore(&ctx->wqh.lock, flags); 55 spin_unlock_irqrestore(&ctx->wqh.lock, flags);
56 56
57 return n; 57 return n;
@@ -120,7 +120,7 @@ static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count,
120 ucnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; 120 ucnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count;
121 ctx->count -= ucnt; 121 ctx->count -= ucnt;
122 if (waitqueue_active(&ctx->wqh)) 122 if (waitqueue_active(&ctx->wqh))
123 wake_up_locked(&ctx->wqh); 123 wake_up_locked_poll(&ctx->wqh, POLLOUT);
124 } 124 }
125 spin_unlock_irq(&ctx->wqh.lock); 125 spin_unlock_irq(&ctx->wqh.lock);
126 if (res > 0 && put_user(ucnt, (__u64 __user *) buf)) 126 if (res > 0 && put_user(ucnt, (__u64 __user *) buf))
@@ -169,7 +169,7 @@ static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t c
169 if (likely(res > 0)) { 169 if (likely(res > 0)) {
170 ctx->count += ucnt; 170 ctx->count += ucnt;
171 if (waitqueue_active(&ctx->wqh)) 171 if (waitqueue_active(&ctx->wqh))
172 wake_up_locked(&ctx->wqh); 172 wake_up_locked_poll(&ctx->wqh, POLLIN);
173 } 173 }
174 spin_unlock_irq(&ctx->wqh.lock); 174 spin_unlock_irq(&ctx->wqh.lock);
175 175