From: Keir Fraser Date: Tue, 6 Apr 2010 06:12:39 +0000 (+0100) Subject: mini-os: Do not use the same wait element twice X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=37eca84e9596d0457fd52c0fcfca05e178ffd9f9;p=people%2Fliuw%2Flibxenctrl-split%2Fmini-os.git 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 --- diff --git a/kernel.c b/kernel.c index 19e4400..99af70a 100644 --- 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;