about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_task.cpp2
-rw-r--r--src/rt/rust_task_thread.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 0e9e7b2eb85..2c810abdeac 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -107,8 +107,6 @@ rust_task::rust_task(rust_task_thread *thread, rust_task_list *state,
 void
 rust_task::delete_this()
 {
-    I(thread, !thread->lock.lock_held_by_current_thread());
-
     {
         scoped_lock with (lock);
         I(thread, port_table.is_empty());
diff --git a/src/rt/rust_task_thread.h b/src/rt/rust_task_thread.h
index 7b05c185be1..f29e165d942 100644
--- a/src/rt/rust_task_thread.h
+++ b/src/rt/rust_task_thread.h
@@ -47,6 +47,8 @@ struct rust_task_thread : public kernel_owned<rust_task_thread>,
 {
 private:
 
+    lock_and_signal lock;
+
     // Fields known only by the runtime:
     rust_log _log;
 
@@ -76,8 +78,6 @@ public:
     rust_scheduler *sched;
     rust_srv *srv;
 
-    lock_and_signal lock;
-
     rust_task_list newborn_tasks;
     rust_task_list running_tasks;
     rust_task_list blocked_tasks;