diff options
author | Richard Braun <rbraun@sceen.net> | 2013-05-16 21:06:24 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-05-16 21:06:24 +0200 |
commit | 23c0966d9c461f061e85233d2f90f9c372617dfd (patch) | |
tree | ef7819519aaacc0f0a7efd399ecb3fd63857e054 | |
parent | 6ffe9ef3191996a7b6491fceea2feab45e4305ce (diff) |
kern/thread: fix wakeup with respect to pinning
-rw-r--r-- | kern/thread.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kern/thread.c b/kern/thread.c index 6cd56ee9..27c0ea4c 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1837,8 +1837,13 @@ thread_wakeup(struct thread *thread) thread_preempt_disable(); cpu_intr_save(&flags); - /* The returned run queue is locked */ - runq = thread_sched_ops[thread->sched_class].select_runq(); + if (!thread->pinned) + runq = thread_sched_ops[thread->sched_class].select_runq(); + else { + runq = thread->runq; + spinlock_lock(&runq->lock); + } + thread_runq_wakeup(runq, thread); spinlock_unlock(&runq->lock); cpu_intr_restore(flags); |