Commit e6b9f850 authored by Nagy Tibor's avatar Nagy Tibor

Migrate from collections

parent 8ec5d472
[dependencies.alloc]
[dependencies.collections]
......@@ -97,7 +97,7 @@ fn main() {
// Write header
f.write_all(b"
mod gen {
use collections::BTreeMap;
use alloc::BTreeMap;
pub fn gen() -> BTreeMap<&'static [u8], (&'static [u8], bool)> {
let mut files: BTreeMap<&'static [u8], (&'static [u8], bool)> = BTreeMap::new();
").unwrap();
......
use collections::vec::Vec;
use collections::string::String;
use alloc::vec::Vec;
use alloc::string::String;
use super::AmlError;
use super::parser::{ AmlParseType, ParseResult, AmlExecutionContext, ExecutionState };
......
//! # AML
//! Code to parse and execute AML tables
use collections::string::String;
use collections::vec::Vec;
use alloc::string::String;
use alloc::vec::Vec;
use core::str::FromStr;
use super::sdt::Sdt;
......
use alloc::boxed::Box;
use collections::string::String;
use collections::btree_map::BTreeMap;
use alloc::string::String;
use alloc::btree_map::BTreeMap;
use super::AmlError;
use super::parser::{ AmlParseType, ParseResult, AmlParseTypeGeneric, AmlExecutionContext, ExecutionState };
......
use alloc::boxed::Box;
use collections::string::String;
use collections::string::ToString;
use collections::vec::Vec;
use collections::btree_map::BTreeMap;
use alloc::string::String;
use alloc::string::ToString;
use alloc::vec::Vec;
use alloc::btree_map::BTreeMap;
use core::fmt::{Debug, Formatter, Error};
use core::str::FromStr;
......
use collections::vec::Vec;
use collections::string::String;
use alloc::vec::Vec;
use alloc::string::String;
use super::AmlError;
use super::parser::{AmlParseType, ParseResult, AmlExecutionContext, ExecutionState};
......
use collections::string::String;
use collections::btree_map::BTreeMap;
use collections::vec::Vec;
use alloc::string::String;
use alloc::btree_map::BTreeMap;
use alloc::vec::Vec;
use alloc::boxed::Box;
use spin::RwLockWriteGuard;
......
use collections::vec::Vec;
use alloc::vec::Vec;
use super::AmlError;
use super::parser::{ AmlParseType, ParseResult, AmlExecutionContext, ExecutionState };
......
use alloc::boxed::Box;
use collections::string::String;
use collections::vec::Vec;
use alloc::string::String;
use alloc::vec::Vec;
use super::{AmlError, parse_aml_with_scope};
use super::parser::{AmlParseType, ParseResult, AmlExecutionContext, ExecutionState};
......
//! # ACPI
//! Code to parse the ACPI tables
use collections::btree_map::BTreeMap;
use collections::string::String;
use collections::vec::Vec;
use alloc::btree_map::BTreeMap;
use alloc::string::String;
use alloc::vec::Vec;
use alloc::boxed::Box;
use syscall::io::{Io, Pio};
......
use alloc::arc::Arc;
use alloc::boxed::Box;
use collections::{BTreeMap, Vec, VecDeque};
use alloc::{BTreeMap, Vec, VecDeque};
use core::mem;
use spin::Mutex;
......
use alloc::arc::{Arc, Weak};
use collections::BTreeMap;
use alloc::BTreeMap;
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
use context;
......
......@@ -2,7 +2,7 @@ use alloc::allocator::{Alloc, Layout};
use alloc::arc::Arc;
use alloc::boxed::Box;
use alloc::heap::Heap;
use collections::BTreeMap;
use alloc::BTreeMap;
use core::mem;
use core::sync::atomic::Ordering;
use paging;
......@@ -36,7 +36,7 @@ impl ContextList {
self.map.get(&super::CONTEXT_ID.load(Ordering::SeqCst))
}
pub fn iter(&self) -> ::collections::btree_map::Iter<ContextId, Arc<RwLock<Context>>> {
pub fn iter(&self) -> ::alloc::btree_map::Iter<ContextId, Arc<RwLock<Context>>> {
self.map.iter()
}
......
use alloc::arc::{Arc, Weak};
use collections::VecDeque;
use alloc::VecDeque;
use core::intrinsics;
use spin::Mutex;
......
use collections::vec_deque::VecDeque;
use alloc::vec_deque::VecDeque;
use core::mem;
use spin::{Once, Mutex, MutexGuard};
......
//! ELF executables
use collections::String;
use alloc::String;
use goblin::elf::section_header::SHT_SYMTAB;
......
......@@ -27,9 +27,8 @@
extern crate alloc_kernel as allocator;
pub extern crate x86;
extern crate alloc;
#[macro_use]
extern crate collections;
extern crate alloc;
#[macro_use]
extern crate bitflags;
......
//! Recycle allocator
//! Uses freed frames if possible, then uses inner allocator
use collections::Vec;
use alloc::Vec;
use paging::PhysicalAddress;
......
use alloc::arc::Arc;
use collections::{BTreeMap, Vec};
use alloc::{BTreeMap, Vec};
use core::{cmp, str};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::{Mutex, RwLock};
......
use alloc::arc::{Arc, Weak};
use collections::BTreeMap;
use alloc::BTreeMap;
use core::{mem, slice};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::RwLock;
......
use collections::BTreeMap;
use alloc::BTreeMap;
use core::{cmp, str};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::RwLock;
......@@ -10,7 +10,7 @@ use syscall::scheme::Scheme;
#[cfg(test)]
mod gen {
use collections::BTreeMap;
use alloc::BTreeMap;
pub fn gen() -> BTreeMap<&'static [u8], (&'static [u8], bool)> { BTreeMap::new() }
}
......
/// Disk scheme replacement when making live disk
use alloc::arc::Arc;
use collections::BTreeMap;
use alloc::BTreeMap;
use core::{cmp, slice};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::RwLock;
......
......@@ -8,7 +8,7 @@
use alloc::arc::Arc;
use alloc::boxed::Box;
use collections::BTreeMap;
use alloc::BTreeMap;
use core::sync::atomic::AtomicUsize;
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
......@@ -174,11 +174,11 @@ impl SchemeList {
Ok(to)
}
pub fn iter(&self) -> ::collections::btree_map::Iter<SchemeId, Arc<Box<Scheme + Send + Sync>>> {
pub fn iter(&self) -> ::alloc::btree_map::Iter<SchemeId, Arc<Box<Scheme + Send + Sync>>> {
self.map.iter()
}
pub fn iter_name(&self, ns: SchemeNamespace) -> ::collections::btree_map::Iter<Box<[u8]>, SchemeId> {
pub fn iter_name(&self, ns: SchemeNamespace) -> ::alloc::btree_map::Iter<Box<[u8]>, SchemeId> {
self.names[&ns].iter()
}
......
use alloc::arc::{Arc, Weak};
use collections::{BTreeMap, VecDeque};
use alloc::{BTreeMap, VecDeque};
use core::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
use spin::{Mutex, Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
......
use alloc::arc::Arc;
use alloc::boxed::Box;
use collections::{BTreeMap, Vec};
use alloc::{BTreeMap, Vec};
use core::str;
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::{Mutex, RwLock};
......
use collections::{String, Vec};
use alloc::{String, Vec};
use core::str;
use context;
......
use collections::Vec;
use alloc::Vec;
use device::cpu::cpu_info;
use syscall::error::{Error, EIO, Result};
......
use collections::Vec;
use alloc::Vec;
use context;
use syscall::error::{Error, ESRCH, Result};
......
use collections::{String, Vec};
use alloc::{String, Vec};
use core::fmt::Write;
use core::str;
......
use alloc::boxed::Box;
use collections::{BTreeMap, Vec};
use alloc::{BTreeMap, Vec};
use core::{cmp, str};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::RwLock;
......
use collections::Vec;
use alloc::Vec;
use context;
use scheme;
......
use collections::Vec;
use alloc::Vec;
use context;
use scheme;
......
use collections::{String, Vec};
use alloc::{String, Vec};
use core::fmt::Write;
use core::str;
......
use collections::Vec;
use alloc::Vec;
use syscall::error::Result;
pub fn resource() -> Result<Vec<u8>> {
......
use collections::BTreeMap;
use alloc::BTreeMap;
use core::{mem, slice, str};
use core::sync::atomic::{AtomicUsize, Ordering};
use spin::RwLock;
......
use alloc::arc::{Arc, Weak};
use alloc::boxed::Box;
use collections::BTreeMap;
use alloc::BTreeMap;
use core::sync::atomic::{AtomicU64, Ordering};
use core::{mem, slice, usize};
use spin::{Mutex, RwLock};
......
use alloc::arc::Arc;
use collections::Vec;
use alloc::Vec;
use spin::{Mutex, RwLock};
use context::{self, Context, SwitchResult};
......
use collections::BTreeMap;
use alloc::BTreeMap;
use core::mem;
use spin::Mutex;
......
use collections::vec_deque::VecDeque;
use alloc::vec_deque::VecDeque;
use spin::Mutex;
use sync::WaitCondition;
......
use core::mem;
use core::ops::Range;
use collections::{String, Vec};
use alloc::{String, Vec};
use super::data::{Stat, TimeSpec};
use super::error::Result;
......
use alloc::arc::Arc;
use collections::VecDeque;
use alloc::VecDeque;
use core::intrinsics;
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
......
use collections::Vec;
use alloc::Vec;
use context;
use scheme::{self, SchemeNamespace};
......
......@@ -2,7 +2,7 @@ use alloc::allocator::{Alloc, Layout};
use alloc::arc::Arc;
use alloc::boxed::Box;
use alloc::heap::Heap;
use collections::{BTreeMap, Vec};
use alloc::{BTreeMap, Vec};
use core::{intrinsics, mem, str};
use core::ops::DerefMut;
use spin::Mutex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment