diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-13 19:13:11 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-13 20:13:53 -0400 |
| commit | cd38377b1b558ebf53a6401b0baf02e0329ba58b (patch) | |
| tree | e7d66e3b4d51e5f5f238834724c805047661af4c /src/rt/rust_builtin.cpp | |
| parent | 1c0b45785387529c1f8d6313d4b632fae53188c1 (diff) | |
| download | rust-cd38377b1b558ebf53a6401b0baf02e0329ba58b.tar.gz rust-cd38377b1b558ebf53a6401b0baf02e0329ba58b.zip | |
Add asserts to check fail_sched_loop() only once
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 66337d6c8ea..001fcd6198b 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -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* |
