Move Io/Pio/Mmio from redox_syscall to common
* Fix Mmio repr from transparent to packed. * Rename Mmio::from to Mmio::new. * Remove dead imports around affected code. * Minor formatting.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ use std::sync::{Arc, Mutex};
|
||||
use std::{fmt, mem};
|
||||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
use syscall::io::{Io, Pio};
|
||||
use common::io::{Io, Pio};
|
||||
|
||||
use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use syscall::io::Mmio;
|
||||
use common::io::Mmio;
|
||||
|
||||
// TODO: Only wrap with Mmio where there are hardware-registers. (Some of these structs seem to be
|
||||
// ring buffer entries, which are not to be treated the same way).
|
||||
|
||||
@@ -10,7 +10,7 @@ use std::convert::TryFrom;
|
||||
use std::ops::Deref;
|
||||
use std::{fmt, mem};
|
||||
|
||||
use syscall::io::Io as _;
|
||||
use common::io::Io as _;
|
||||
|
||||
use num_derive::FromPrimitive;
|
||||
use num_traits::FromPrimitive;
|
||||
|
||||
@@ -3,7 +3,8 @@ use rustc_hash::FxHashMap;
|
||||
use std::fmt::LowerHex;
|
||||
use std::mem::size_of;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use syscall::{Io, Pio, PAGE_SIZE};
|
||||
use syscall::PAGE_SIZE;
|
||||
use common::io::{Io, Pio};
|
||||
|
||||
const PAGE_MASK: usize = !(PAGE_SIZE - 1);
|
||||
const OFFSET_MASK: usize = PAGE_SIZE - 1;
|
||||
|
||||
Reference in New Issue
Block a user