Remove env scheme and env field on context, fix all warnings

This commit is contained in:
Jeremy Soller
2018-08-11 11:34:32 -06:00
parent fe90664e33
commit 30e68f917e
14 changed files with 29 additions and 326 deletions
+1 -4
View File
@@ -1,6 +1,6 @@
use alloc::arc::Arc;
use alloc::boxed::Box;
use alloc::{BTreeMap, Vec, VecDeque};
use alloc::{Vec, VecDeque};
use core::cmp::Ordering;
use core::mem;
use spin::Mutex;
@@ -150,8 +150,6 @@ pub struct Context {
pub name: Arc<Mutex<Box<[u8]>>>,
/// The current working directory
pub cwd: Arc<Mutex<Vec<u8>>>,
/// The process environment
pub env: Arc<Mutex<BTreeMap<Box<[u8]>, Arc<Mutex<Vec<u8>>>>>>,
/// The open files in the scheme
pub files: Arc<Mutex<Vec<Option<FileDescriptor>>>>,
/// Singal actions
@@ -191,7 +189,6 @@ impl Context {
grants: Arc::new(Mutex::new(Vec::new())),
name: Arc::new(Mutex::new(Vec::new().into_boxed_slice())),
cwd: Arc::new(Mutex::new(Vec::new())),
env: Arc::new(Mutex::new(BTreeMap::new())),
files: Arc::new(Mutex::new(Vec::new())),
actions: Arc::new(Mutex::new(vec![(
SigAction {
+1 -1
View File
@@ -1,7 +1,7 @@
use alloc::arc::Arc;
use alloc::boxed::Box;
use alloc::BTreeMap;
use core::alloc::{Alloc, GlobalAlloc, Layout};
use core::alloc::{GlobalAlloc, Layout};
use core::mem;
use core::sync::atomic::Ordering;
use paging;
+2 -2
View File
@@ -1,8 +1,8 @@
//! # Context management
//!
//!
//! For resources on contexts, please consult [wikipedia](https://en.wikipedia.org/wiki/Context_switch) and [osdev](https://wiki.osdev.org/Context_Switching)
use alloc::boxed::Box;
use core::alloc::{Alloc, GlobalAlloc, Layout};
use core::alloc::{GlobalAlloc, Layout};
use core::sync::atomic::Ordering;
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};