mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 16:16:16 +04:00
update process
crate to 2018 edition
This commit is contained in:
parent
12457f10cb
commit
4495622317
@ -2,6 +2,7 @@
|
||||
name = "ucore-process"
|
||||
version = "0.1.0"
|
||||
authors = ["WangRunji <wangrunji0408@163.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![no_std]
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![feature(alloc)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(linkage)]
|
||||
@ -6,16 +6,9 @@
|
||||
#![feature(vec_resize_default)]
|
||||
#![feature(asm)]
|
||||
#![feature(exact_size_is_empty)]
|
||||
#![feature(extern_crate_item_prelude)]
|
||||
|
||||
extern crate alloc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate spin;
|
||||
|
||||
// To use `println!` in test
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
|
||||
mod process_manager;
|
||||
mod processor;
|
||||
@ -24,5 +17,5 @@ pub mod thread;
|
||||
mod event_hub;
|
||||
mod interrupt;
|
||||
|
||||
pub use process_manager::*;
|
||||
pub use processor::Processor;
|
||||
pub use crate::process_manager::*;
|
||||
pub use crate::processor::Processor;
|
||||
|
@ -1,10 +1,11 @@
|
||||
use alloc::boxed::Box;
|
||||
use alloc::sync::Arc;
|
||||
use spin::Mutex;
|
||||
use scheduler::Scheduler;
|
||||
use core::cell::UnsafeCell;
|
||||
use alloc::vec::Vec;
|
||||
use event_hub::EventHub;
|
||||
use spin::Mutex;
|
||||
use log::*;
|
||||
use core::cell::UnsafeCell;
|
||||
use crate::scheduler::Scheduler;
|
||||
use crate::event_hub::EventHub;
|
||||
|
||||
struct Process {
|
||||
id: Pid,
|
||||
|
@ -1,9 +1,10 @@
|
||||
use alloc::boxed::Box;
|
||||
use alloc::sync::Arc;
|
||||
use spin::Mutex;
|
||||
use log::*;
|
||||
use core::cell::UnsafeCell;
|
||||
use process_manager::*;
|
||||
use interrupt;
|
||||
use crate::process_manager::*;
|
||||
use crate::interrupt;
|
||||
|
||||
/// Process executor
|
||||
///
|
||||
|
@ -1,4 +1,5 @@
|
||||
use alloc::{collections::BinaryHeap, vec::Vec};
|
||||
use log::*;
|
||||
|
||||
type Pid = usize;
|
||||
|
||||
|
@ -11,9 +11,10 @@ use alloc::collections::BTreeMap;
|
||||
use core::marker::PhantomData;
|
||||
use core::ptr;
|
||||
use core::time::Duration;
|
||||
use processor::*;
|
||||
use process_manager::*;
|
||||
use scheduler::Scheduler;
|
||||
use log::*;
|
||||
use crate::processor::*;
|
||||
use crate::process_manager::*;
|
||||
use crate::scheduler::Scheduler;
|
||||
|
||||
#[linkage = "weak"]
|
||||
#[no_mangle]
|
||||
|
Loading…
Reference in New Issue
Block a user