aboutsummaryrefslogtreecommitdiff
path: root/src/proc/sched.rs
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-06-10 20:47:54 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:17:14 +0200
commit13e3eca8ac3f6bd8c7a8fddde8b1937757e358ee (patch)
treeeb2d4992d5692287c232ac729ad18f9690eaa153 /src/proc/sched.rs
parent8aaad696463004a9e51d35e4c466c131b3402822 (diff)
proc: basic task/stack creation
Now we can do a simple context swap (without scheduler though)
Diffstat (limited to 'src/proc/sched.rs')
-rw-r--r--src/proc/sched.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/proc/sched.rs b/src/proc/sched.rs
index 8e86c7f..81648bf 100644
--- a/src/proc/sched.rs
+++ b/src/proc/sched.rs
@@ -1,17 +1,3 @@
use crate::proc::task::*;
-use alloc::collections::linked_list::LinkedList;
+use alloc::collections::VecDeque;
// TODO the lifetime here is pretty much broken. Fix this later
-pub struct Scheduler<'a> {
- run_list: LinkedList<&'a Task>,
-}
-
-impl<'a> Scheduler<'a> {
- #[inline]
- pub fn pop_front(&mut self) -> Option<&Task> {
- self.run_list.pop_front()
- }
- #[inline]
- pub fn push_back(&mut self, t: &'a Task) {
- self.run_list.push_back(t);
- }
-}