diff -urNp o1-sched-ref/include/linux/wait.h o1-sched/include/linux/wait.h --- o1-sched-ref/include/linux/wait.h Wed May 29 19:58:06 2002 +++ o1-sched/include/linux/wait.h Wed May 29 20:17:12 2002 @@ -59,6 +59,7 @@ typedef struct __wait_queue wait_queue_t # define wq_write_lock_irq write_lock_irq # define wq_write_lock_irqsave write_lock_irqsave # define wq_write_unlock_irqrestore write_unlock_irqrestore +# define wq_write_unlock_irq write_unlock_irq # define wq_write_unlock write_unlock #else # define wq_lock_t spinlock_t @@ -71,6 +72,7 @@ typedef struct __wait_queue wait_queue_t # define wq_write_lock_irq spin_lock_irq # define wq_write_lock_irqsave spin_lock_irqsave # define wq_write_unlock_irqrestore spin_unlock_irqrestore +# define wq_write_unlock_irq spin_unlock_irq # define wq_write_unlock spin_unlock #endif diff -urNp o1-sched-ref/kernel/sched.c o1-sched/kernel/sched.c --- o1-sched-ref/kernel/sched.c Wed May 29 20:16:59 2002 +++ o1-sched/kernel/sched.c Wed May 29 20:17:07 2002 @@ -850,15 +850,15 @@ void complete(struct completion *x) { unsigned long flags; - spin_lock_irqsave(&x->wait.lock, flags); + wq_write_lock_irqsave(&x->wait.lock, flags); x->done++; __wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1); - spin_unlock_irqrestore(&x->wait.lock, flags); + wq_write_unlock_irqrestore(&x->wait.lock, flags); } void wait_for_completion(struct completion *x) { - spin_lock_irq(&x->wait.lock); + wq_write_lock_irq(&x->wait.lock); if (!x->done) { DECLARE_WAITQUEUE(wait, current); @@ -866,14 +866,14 @@ void wait_for_completion(struct completi __add_wait_queue_tail(&x->wait, &wait); do { __set_current_state(TASK_UNINTERRUPTIBLE); - spin_unlock_irq(&x->wait.lock); + wq_write_unlock_irq(&x->wait.lock); schedule(); - spin_lock_irq(&x->wait.lock); + wq_write_lock_irq(&x->wait.lock); } while (!x->done); __remove_wait_queue(&x->wait, &wait); } x->done--; - spin_unlock_irq(&x->wait.lock); + wq_write_unlock_irq(&x->wait.lock); } #define SLEEP_ON_VAR \