Move system to the right location
This commit is contained in:
parent
68ee179e12
commit
b39e56b9c4
@ -1,4 +1,5 @@
|
|||||||
mod process;
|
mod process;
|
||||||
pub mod thread;
|
pub mod thread;
|
||||||
pub mod scheduler;
|
pub mod scheduler;
|
||||||
pub mod mgerror;
|
pub mod mgerror;
|
||||||
|
pub mod system;
|
@ -2,8 +2,8 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use crate::utility::list::List;
|
use crate::utility::list::List;
|
||||||
use crate::kernel::thread::Thread;
|
use crate::kernel::thread::Thread;
|
||||||
use crate::utility::system::{G_CURRENT_THREAD, G_THREAD_TO_BE_DESTROYED};
|
|
||||||
|
|
||||||
|
use super::system::{G_CURRENT_THREAD, G_THREAD_TO_BE_DESTROYED};
|
||||||
|
|
||||||
pub struct Scheduler {
|
pub struct Scheduler {
|
||||||
ready_list: List<Arc<Thread>>
|
ready_list: List<Arc<Thread>>
|
||||||
|
@ -2,9 +2,8 @@ use std::{sync::{RwLock, Arc}};
|
|||||||
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
|
||||||
use crate::kernel::{thread::Thread, scheduler::Scheduler};
|
use crate::{kernel::{thread::Thread, scheduler::Scheduler}, utility::list::List};
|
||||||
|
|
||||||
use super::list::List;
|
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
@ -1,7 +1,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use super::{process::Process, mgerror::ErrorCode};
|
use super::{process::Process, mgerror::ErrorCode, system::{ObjectType, G_ALIVE, G_SCHEDULER}};
|
||||||
use crate::{simulator::machine::{NUM_INT_REGS, NUM_FP_REGS, STACK_REG}, utility::system::{ObjectType, G_ALIVE, G_SCHEDULER}, kernel::scheduler};
|
use crate::{simulator::machine::{NUM_INT_REGS, NUM_FP_REGS, STACK_REG}};
|
||||||
|
|
||||||
const SIMULATORSTACKSIZE: usize = 32 * 1024;
|
const SIMULATORSTACKSIZE: usize = 32 * 1024;
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
pub mod list;
|
pub mod list;
|
||||||
pub mod system;
|
|
Loading…
Reference in New Issue
Block a user