diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-02-02 16:47:21 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-02 18:10:24 -0800 |
| commit | 5c3c8d454d58b3bb4a79d36b76582f1f7761bc75 (patch) | |
| tree | 895bd975518bbb0cc64c391e992572aa47508c8e /src/rt/rust_kernel.cpp | |
| parent | 5449b886d34c1ddbba60986d56d6896543a6b87f (diff) | |
| download | rust-5c3c8d454d58b3bb4a79d36b76582f1f7761bc75.tar.gz rust-5c3c8d454d58b3bb4a79d36b76582f1f7761bc75.zip | |
rt: Do all signalling while holding a lock
This will matter once the scheduler is changed to not wake up on a timer
Diffstat (limited to 'src/rt/rust_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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(); } } |
