debuggers.hg

changeset 21150:4822f82acec6

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@ens-lyon.org>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 06 07:12:39 2010 +0100 (2010-04-06)
parents 61372a4f4e76
children a3f7352d83eb
files extras/mini-os/kernel.c
line diff
     1.1 --- a/extras/mini-os/kernel.c	Tue Apr 06 07:11:48 2010 +0100
     1.2 +++ b/extras/mini-os/kernel.c	Tue Apr 06 07:12:39 2010 +0100
     1.3 @@ -353,6 +353,7 @@ static struct kbdfront_dev *kbd_dev;
     1.4  static void kbdfront_thread(void *p)
     1.5  {
     1.6      DEFINE_WAIT(w);
     1.7 +    DEFINE_WAIT(w2);
     1.8      int x = WIDTH / 2, y = HEIGHT / 2, z = 0;
     1.9  
    1.10      kbd_dev = init_kbdfront(NULL, 1);
    1.11 @@ -367,7 +368,7 @@ static void kbdfront_thread(void *p)
    1.12          int sleep = 1;
    1.13  
    1.14          add_waiter(w, kbdfront_queue);
    1.15 -        add_waiter(w, fbfront_queue);
    1.16 +        add_waiter(w2, fbfront_queue);
    1.17  
    1.18          while (kbdfront_receive(kbd_dev, &kbdevent, 1) != 0) {
    1.19              sleep = 0;