]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
mini-os: Do not use the same wait element twice
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 6 Apr 2010 06:12:39 +0000 (07:12 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 6 Apr 2010 06:12:39 +0000 (07:12 +0100)
To enqueue the kbdfront thread on two separate wait queues, we need
two different wait elements.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
kernel.c

index 19e4400be443d68d175d35a3d432d0595db5308c..99af70aa1db72273af17bb83a79b33dfaf8ff27a 100644 (file)
--- a/kernel.c
+++ b/kernel.c
@@ -353,6 +353,7 @@ static struct kbdfront_dev *kbd_dev;
 static void kbdfront_thread(void *p)
 {
     DEFINE_WAIT(w);
+    DEFINE_WAIT(w2);
     int x = WIDTH / 2, y = HEIGHT / 2, z = 0;
 
     kbd_dev = init_kbdfront(NULL, 1);
@@ -367,7 +368,7 @@ static void kbdfront_thread(void *p)
         int sleep = 1;
 
         add_waiter(w, kbdfront_queue);
-        add_waiter(w, fbfront_queue);
+        add_waiter(w2, fbfront_queue);
 
         while (kbdfront_receive(kbd_dev, &kbdevent, 1) != 0) {
             sleep = 0;