diff options
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index d7c62780fbb..823937443b5 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -37,6 +37,7 @@ rust_task::rust_task(rust_sched_loop *sched_loop, rust_task_state state, cond_name("none"), killed(false), reentered_rust_stack(false), + disallow_kill(false), c_stack(NULL), next_c_sp(0), next_rust_sp(0), @@ -211,7 +212,7 @@ rust_task::must_fail_from_being_killed() { bool rust_task::must_fail_from_being_killed_unlocked() { kill_lock.must_have_lock(); - return killed && !reentered_rust_stack; + return killed && !reentered_rust_stack && !disallow_kill; } // Only run this on the rust stack @@ -645,6 +646,16 @@ rust_task::on_rust_stack() { } } +void +rust_task::inhibit_kill() { + disallow_kill = true; +} + +void +rust_task::allow_kill() { + disallow_kill = false; +} + // // Local Variables: // mode: C++ |
