diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-29 21:43:22 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-29 22:43:11 -0700 |
| commit | 6657e729de2d4544d4f014091ef05878937895dc (patch) | |
| tree | 891d84803a2a13637a67e4bca1e0ec9c4bf5195e /src/rt/rust_upcall.cpp | |
| parent | 96a629d2fa5144ccba39cc0e4258b6e0fe2da283 (diff) | |
| download | rust-6657e729de2d4544d4f014091ef05878937895dc.tar.gz rust-6657e729de2d4544d4f014091ef05878937895dc.zip | |
Lock the new task's scheduler when creating a task
Previously we were locking the spawning task's scheduler. I couldn't see that that was protecting anything. The newborn_task list in the new task's scheduler though was unprotected from concurrent access. So now we're locking the new task's scheduler.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 048be072e12..57512fd8c2a 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -526,7 +526,6 @@ extern "C" CDECL rust_task * upcall_new_task(rust_task *spawner, rust_vec *name) { // name is a rust string structure. LOG_UPCALL_ENTRY(spawner); - scoped_lock with(spawner->sched->lock); rust_task *task = spawner->kernel->create_task(spawner, (const char *)name->data); task->ref(); |
