From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761829AbZBEUZq (ORCPT ); Thu, 5 Feb 2009 15:25:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760738AbZBEUXu (ORCPT ); Thu, 5 Feb 2009 15:23:50 -0500 Received: from x35.xmailserver.org ([64.71.152.41]:33479 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760567AbZBEUXs (ORCPT ); Thu, 5 Feb 2009 15:23:48 -0500 X-AuthUser: davidel@xmailserver.org From: Davide Libenzi To: Linux Kernel Mailing List Cc: Andrew Morton , Linus Torvalds , Alan Cox , Ingo Molnar , David Miller Date: Thu, 05 Feb 2009 12:23:39 -0800 Subject: [patch 5/6] epoll keyed wakeups v3 - make eventfd use keyed wakeups MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patch introduces keyed event wakeups inside the eventfd code. Signed-off-by: Davide Libenzi - Davide --- fs/eventfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6.mod/fs/eventfd.c =================================================================== --- linux-2.6.mod.orig/fs/eventfd.c 2009-02-03 13:43:52.000000000 -0800 +++ linux-2.6.mod/fs/eventfd.c 2009-02-03 13:44:05.000000000 -0800 @@ -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); + wake_up_locked_poll(&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); + wake_up_locked_poll(&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); + wake_up_locked_poll(&ctx->wqh, POLLIN); } spin_unlock_irq(&ctx->wqh.lock);