Skip to content

Commit 2d8ef73

Browse files
committed
rt: Add some more locking asserts to rust_sched_loop
1 parent c8dc6fc commit 2d8ef73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rt/rust_sched_loop.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ rust_sched_loop::rust_sched_loop(rust_scheduler *sched,
4444

4545
void
4646
rust_sched_loop::activate(rust_task *task) {
47+
lock.must_have_lock();
4748
task->ctx.next = &c_context;
4849
DLOG(this, task, "descheduling...");
4950
lock.unlock();
@@ -147,6 +148,7 @@ rust_sched_loop::release_task(rust_task *task) {
147148
*/
148149
rust_task *
149150
rust_sched_loop::schedule_task() {
151+
lock.must_have_lock();
150152
I(this, this);
151153
// FIXME: in the face of failing tasks, this is not always right.
152154
// I(this, n_live_tasks() > 0);

0 commit comments

Comments
 (0)