Update for new rust
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
use core::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
use arch::debug::Writer;
|
||||
@@ -18,7 +18,7 @@ fn init_input() -> WaitQueue<u8> {
|
||||
WaitQueue::new()
|
||||
}
|
||||
|
||||
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
static HANDLES: Once<RwLock<BTreeMap<usize, usize>>> = Once::new();
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
use alloc::sync::{Arc, Weak};
|
||||
use alloc::collections::{BTreeMap, VecDeque};
|
||||
use core::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
use spin::{Mutex, Once, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
use event;
|
||||
@@ -13,7 +13,7 @@ use syscall::data::Stat;
|
||||
|
||||
/// Pipes list
|
||||
pub static PIPE_SCHEME_ID: AtomicSchemeId = ATOMIC_SCHEMEID_INIT;
|
||||
static PIPE_NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
static PIPE_NEXT_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
static PIPES: Once<RwLock<(BTreeMap<usize, Arc<PipeRead>>, BTreeMap<usize, Arc<PipeWrite>>)>> = Once::new();
|
||||
|
||||
/// Initialize pipes, called if needed
|
||||
|
||||
Reference in New Issue
Block a user