From bed59f00a63e89abf1f82a6b10d5e8a493d54788 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Tue, 11 Jun 2024 15:07:40 +0200 Subject: interrupt: add irq_save/restore helpers Signed-off-by: Tianhao Wang --- src/proc/sched.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/proc') diff --git a/src/proc/sched.rs b/src/proc/sched.rs index 613336e..701f165 100644 --- a/src/proc/sched.rs +++ b/src/proc/sched.rs @@ -39,6 +39,8 @@ impl Scheduler { // pop front, push back pub fn do_schedule() { + // TODO: remove this spinlock, because we should protect the scheduler + // with irq_save/restore if SCHEDULER.is_locked() { panic!("scheduler lock has been taken, something wrong"); } -- cgit v1.2.3-70-g09d2