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-devel

[Xen-devel] [PATCH] mini-os: Do not use the same wait element twice

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] mini-os: Do not use the same wait element twice
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Sun, 4 Apr 2010 19:15:26 +0200
Delivery-date: Sun, 04 Apr 2010 10:16:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
mini-os: Do not use the same wait element twice

To enqueue the kbdfront thread on two separate wait queues, we need two
different wait elements.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff -r 8dada4c897c9 extras/mini-os/kernel.c
--- a/extras/mini-os/kernel.c   Sat Mar 06 13:31:42 2010 +0000
+++ b/extras/mini-os/kernel.c   Sun Apr 04 19:13:06 2010 +0200
@@ -353,6 +353,7 @@
 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 @@
         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;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] mini-os: Do not use the same wait element twice, Samuel Thibault <=