From 5c3c8d454d58b3bb4a79d36b76582f1f7761bc75 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 2 Feb 2012 16:47:21 -0800 Subject: rt: Do all signalling while holding a lock This will matter once the scheduler is changed to not wake up on a timer --- src/rt/rust_kernel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/rt/rust_kernel.cpp') diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index 3a28af4473b..a52c2d48eed 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -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(); } } -- cgit 1.4.1-3-g733a5