rt: Only wake up all schedulers when no tasks are left

At the moment there's not really any reason to be raising this signal,
since they schedulers wake up periodically anyway, but once we remove
the timer this will be how the schedulers know to exit.
This commit is contained in:
Brian Anderson
2012-02-02 17:02:50 -08:00
parent 5c3c8d454d
commit aee83d2ff1
4 changed files with 25 additions and 9 deletions

View File

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