aboutsummaryrefslogtreecommitdiff
path: root/src/proc
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-06-11 15:07:40 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:17:15 +0200
commitbed59f00a63e89abf1f82a6b10d5e8a493d54788 (patch)
tree3f4b6d2c1c35267fdf004d9e1934db387f874b09 /src/proc
parent49fc3b6df25bea2aaccbe2b26735204e3ee4b809 (diff)
interrupt: add irq_save/restore helpers
Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
Diffstat (limited to 'src/proc')
-rw-r--r--src/proc/sched.rs2
1 files changed, 2 insertions, 0 deletions
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");
}