Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Buddy allocator metadata for pools
[palacios.git] / linux_module / iface-host-dev.c
index 86b0e0c..b9d754d 100644 (file)
@@ -301,6 +301,10 @@ static unsigned int host_dev_poll(struct file * filp,
 
     palacios_spinlock_lock_irqsave(&(dev->lock),f);
 
+
+    // register ourselves on the user wait queue
+    poll_wait(filp, &(dev->user_wait_queue), poll_tb);
+
     if (dev->waiting) { 
        // Yes, we have a request if you want it!
        palacios_spinlock_unlock_irqrestore(&(dev->lock),f);
@@ -310,9 +314,6 @@ static unsigned int host_dev_poll(struct file * filp,
 
     // No request yet, so we need to wait for one to show up.
 
-    // register ourselves on the user wait queue
-    poll_wait(filp, &(dev->user_wait_queue), poll_tb);
-
     palacios_spinlock_unlock_irqrestore(&(dev->lock),f);
 
     DEEP_DEBUG_PRINT("palacios: hostdev: poll delayed\n");