Removing most of the locks in rust_upcall.cpp and elsewhere.

This commit is contained in:
Eric Holk
2011-07-06 12:48:43 -07:00
parent e7111fe147
commit a0f45f4456
4 changed files with 46 additions and 75 deletions

View File

@@ -392,17 +392,12 @@ task_yield(rust_task *task) {
extern "C" CDECL void
task_join(rust_task *task, rust_task *join_task) {
task->kernel->scheduler_lock.lock();
// If the other task is already dying, we don't have to wait for it.
if (join_task->dead() == false) {
join_task->tasks_waiting_to_join.push(task);
task->block(join_task, "joining local task");
task->kernel->scheduler_lock.unlock();
task->yield(2);
}
else {
task->kernel->scheduler_lock.unlock();
}
}
/* Debug builtins for std.dbg. */