Rewrite reap_dead_tasks to never grab the sched lock before a task lock

Doing so contradicts the locking order used everywhere else and causes
deadlocks.

Un-XFAIL task-perf-spawnalot

Closes #854
This commit is contained in:
Brian Anderson
2011-08-20 16:05:18 -07:00
parent 25416bfae1
commit abdb6cd71b
3 changed files with 47 additions and 9 deletions

View File

@@ -90,6 +90,7 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
rust_task::~rust_task()
{
I(sched, !sched->lock.lock_held_by_current_thread());
DLOG(sched, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d",
name, (uintptr_t)this, ref_count);