1
0
forked from Rativel/BurritOS

Implemente finish (not finished yet), fix ucontext for windows

This commit is contained in:
Quentin Legot
2023-03-08 13:21:08 +01:00
committed by François Autin
parent 3457f67a7c
commit dc49951bab
5 changed files with 55 additions and 12 deletions

View File

@@ -2,11 +2,12 @@ use std::{sync::{RwLock, Arc}};
use lazy_static::lazy_static;
use crate::{kernel::{thread::Thread, scheduler::Scheduler}, utility::list::List};
use crate::{kernel::{thread::Thread, scheduler::Scheduler}, utility::list::List, simulator::machine::Machine};
extern crate lazy_static;
lazy_static! {
pub static ref G_MACHINE: RwLock<Machine> = RwLock::new(Machine::_init_machine());
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 ref G_ALIVE: RwLock<List<Arc<Thread>>> = RwLock::new(List::new());