use std::{sync::{RwLock, Arc}}; use lazy_static::lazy_static; use crate::kernel::{thread::Thread, scheduler::Scheduler}; use super::list::List; extern crate lazy_static; lazy_static! { pub static ref G_CURRENT_THREAD: RwLock> = RwLock::new(Option::None); pub static ref G_THREAD_TO_BE_DESTROYED: RwLock> = RwLock::new(Option::None); pub static ref G_ALIVE: RwLock>> = RwLock::new(List::new()); pub static ref G_SCHEDULER: RwLock = RwLock::new(Scheduler::new()); } #[derive(PartialEq)] pub enum ObjectType { SemaphoreType, LockType, ConditionType, FileType, ThreadType, InvalidType }