WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Add poll() support to xenbus device file.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add poll() support to xenbus device file.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Mar 2006 12:08:07 +0000
Delivery-date: Mon, 20 Mar 2006 12:09:28 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 056e571ce462d44612f2300ff17f589b2e43368b
# Parent  cf89e8f0831b3a483c1b8c614d1b8eb02180548b
Add poll() support to xenbus device file.

From: Gerd Hoffmann
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r cf89e8f0831b -r 056e571ce462 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Mon Mar 20 
08:56:54 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Mon Mar 20 
11:00:58 2006
@@ -36,6 +36,7 @@
 #include <linux/notifier.h>
 #include <linux/wait.h>
 #include <linux/fs.h>
+#include <linux/poll.h>
 
 #include "xenbus_comms.h"
 
@@ -207,11 +208,22 @@
        return 0;
 }
 
+static unsigned int xenbus_dev_poll(struct file *file, poll_table *wait)
+{
+       struct xenbus_dev_data *u = file->private_data;
+
+       poll_wait(file, &u->read_waitq, wait);
+       if (u->read_cons != u->read_prod)
+               return POLLIN | POLLRDNORM;
+       return 0;
+}
+
 static struct file_operations xenbus_dev_file_ops = {
        .read = xenbus_dev_read,
        .write = xenbus_dev_write,
        .open = xenbus_dev_open,
        .release = xenbus_dev_release,
+       .poll = xenbus_dev_poll,
 };
 
 static int __init

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add poll() support to xenbus device file., Xen patchbot -unstable <=