about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 46c9aebe6cf..b2a60dc92bc 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -528,9 +528,15 @@ rust_task::free(void *mem, memory_region::memory_region_type type) {
 }
 
 void rust_task::pin() {
+    I(this->sched, running_on != -1);
     pinned_on = running_on;
 }
 
+void rust_task::pin(int id) {
+    I(this->sched, running_on == -1);
+    pinned_on = id;
+}
+
 void rust_task::unpin() {
     pinned_on = -1;
 }