add todos
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
parent
77a7f1229c
commit
957e767dfc
@ -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>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user