Fix global var
This commit is contained in:
committed by
François Autin
parent
e3e217c57f
commit
cf1c7aad5a
@ -1,9 +1,17 @@
|
||||
use std::sync::{Mutex, RwLock};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use crate::kernel::thread::Thread;
|
||||
extern crate lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref g_current_thread: RwLock<Option<Thread>> = RwLock::new(Option::None);
|
||||
pub static ref g_thread_to_be_destroyed: RwLock<Option<Thread>> = RwLock::new(Option::None);
|
||||
}
|
||||
|
||||
|
||||
pub static g_current_thread: Box<Option<Thread>> = Box::new(Option::None);
|
||||
pub static g_thread_to_be_destroyed: Box<Option<Thread>> = Box::new(Option::None);
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum ObjectType {
|
||||
SEMAPHORE_TYPE,
|
||||
LOCK_TYPE,
|
||||
|
Reference in New Issue
Block a user