From aee83d2ff11139db92d37d2afc4e1dba3d198012 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 2 Feb 2012 17:02:50 -0800 Subject: 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. --- src/rt/rust_kernel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/rt/rust_kernel.cpp') diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index a52c2d48eed..aaf19f240c8 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -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(); } } -- cgit 1.4.1-3-g733a5