Update to new dependencies
This commit is contained in:
@@ -5,7 +5,6 @@ use event;
|
||||
use spin::RwLock;
|
||||
use scheme::{self, SchemeId};
|
||||
use syscall::error::{Result, Error, EBADF};
|
||||
use scheme::FileHandle;
|
||||
|
||||
/// A file description
|
||||
#[derive(Debug)]
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
use alloc::allocator::{Alloc, Layout};
|
||||
use alloc::arc::Arc;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::heap::Heap;
|
||||
use alloc::BTreeMap;
|
||||
use core::alloc::{Alloc, GlobalAlloc, Layout};
|
||||
use core::mem;
|
||||
use core::sync::atomic::Ordering;
|
||||
use paging;
|
||||
@@ -67,7 +66,7 @@ impl ContextList {
|
||||
let context_lock = self.new_context()?;
|
||||
{
|
||||
let mut context = context_lock.write();
|
||||
let mut fx = unsafe { Box::from_raw(Heap.alloc(Layout::from_size_align_unchecked(512, 16)).unwrap().as_ptr() as *mut [u8; 512]) };
|
||||
let mut fx = unsafe { Box::from_raw(::ALLOCATOR.alloc(Layout::from_size_align_unchecked(512, 16)) as *mut [u8; 512]) };
|
||||
for b in fx.iter_mut() {
|
||||
*b = 0;
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
//! Context management
|
||||
use alloc::allocator::{Alloc, Layout};
|
||||
use alloc::boxed::Box;
|
||||
use alloc::heap::Heap;
|
||||
use core::alloc::{Alloc, GlobalAlloc, Layout};
|
||||
use core::sync::atomic::Ordering;
|
||||
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
@@ -49,7 +48,7 @@ pub fn init() {
|
||||
let mut contexts = contexts_mut();
|
||||
let context_lock = contexts.new_context().expect("could not initialize first context");
|
||||
let mut context = context_lock.write();
|
||||
let mut fx = unsafe { Box::from_raw(Heap.alloc(Layout::from_size_align_unchecked(512, 16)).unwrap().as_ptr() as *mut [u8; 512]) };
|
||||
let mut fx = unsafe { Box::from_raw(::ALLOCATOR.alloc(Layout::from_size_align_unchecked(512, 16)) as *mut [u8; 512]) };
|
||||
for b in fx.iter_mut() {
|
||||
*b = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user