rt: Do all signalling while holding a lock

This will matter once the scheduler is changed to not wake up on a timer
This commit is contained in:
Brian Anderson
2012-02-02 16:47:21 -08:00
parent 5449b886d3
commit 5c3c8d454d
2 changed files with 5 additions and 9 deletions

View File

@@ -191,7 +191,9 @@ rust_kernel::release_task_id(rust_task_id id) {
void rust_kernel::wakeup_schedulers() {
for(size_t i = 0; i < num_threads; ++i) {
threads[i]->lock.signal_all();
rust_scheduler *sched = threads[i];
scoped_lock with(sched->lock);
sched->lock.signal_all();
}
}