rt: Remove the recursive lock from rust_task_thread

This commit is contained in:
Brian Anderson 2012-03-17 17:39:46 -07:00
parent 3ee4a15e5e
commit 132266b2cb

View File

@ -308,11 +308,7 @@ void
rust_task_thread::transition(rust_task *task,
rust_task_list *src, rust_task_list *dst,
rust_cond *cond, const char* cond_name) {
bool unlock = false;
if(!lock.lock_held_by_current_thread()) {
unlock = true;
lock.lock();
}
scoped_lock with(lock);
DLOG(this, task,
"task %s " PTR " state change '%s' -> '%s' while in '%s'",
name, (uintptr_t)this, src->name, dst->name,
@ -323,8 +319,6 @@ rust_task_thread::transition(rust_task *task,
task->set_state(dst, cond, cond_name);
lock.signal();
if(unlock)
lock.unlock();
}
void rust_task_thread::run() {