Add asserts to check fail_sched_loop() only once

This commit is contained in:
Ben Blum 2012-07-13 19:13:11 -04:00
parent 1c0b457853
commit cd38377b1b
4 changed files with 15 additions and 3 deletions

View file

@ -864,8 +864,12 @@ rust_task_kill_other(rust_task *task) { /* Used for linked failure */
}
extern "C" void
rust_task_kill_all(rust_task *task) {
rust_task_kill_all(rust_task *task) { /* Used for linked failure */
task->fail_sched_loop();
// This must not happen twice.
static bool main_taskgroup_failed = false;
assert(!main_taskgroup_failed);
main_taskgroup_failed = true;
}
extern "C" rust_cond_lock*