add todos
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build encountered an error

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
Julien CLEMENT 2023-01-07 16:06:05 +01:00
parent 77a7f1229c
commit 957e767dfc
3 changed files with 4 additions and 0 deletions

@ -9,6 +9,7 @@ pub fn gettick() -> u64 {
}
pub extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: InterruptStackFrame) {
// TODO: thread preemption
unsafe {
TICKS += 1;
PICS.lock()

@ -15,6 +15,7 @@ use futures_util::task::AtomicWaker;
use lazy_static::lazy_static;
lazy_static! {
// TODO: put this in a spin mutex instead
pub static ref SCHEDULER: AsyncMutex<Scheduler> = AsyncMutex::new(Scheduler::new());
}
@ -23,6 +24,7 @@ pub type Threadt = Arc<RefCell<Thread>>;
pub const K_THREAD_ID: ThreadId = ThreadId(0); // Kernel main thread identifier
struct ThreadStream {
// TODO: add the double scheduler queue
ids: ArrayQueue<ThreadId>,
waker: AtomicWaker,
}

@ -11,6 +11,7 @@ use futures_util::task::AtomicWaker;
#[derive(Clone)]
struct Lock {
lock: Arc<AtomicBool>,
// TODO: Make a queue of wakers
waker: Arc<AtomicWaker>,
}