diff --git a/src/framework/jinux-frame/src/cell.rs b/src/framework/jinux-frame/src/cell.rs deleted file mode 100644 index e6e0895dd..000000000 --- a/src/framework/jinux-frame/src/cell.rs +++ /dev/null @@ -1,39 +0,0 @@ -use core::{ - cell::UnsafeCell, - ops::{Deref, DerefMut}, -}; - -#[derive(Debug, Default)] -#[repr(transparent)] -pub struct Cell(UnsafeCell); - -unsafe impl Sync for Cell {} - -impl Cell { - /// User is responsible to guarantee that inner struct is only used in - /// uniprocessor. - #[inline(always)] - pub const fn new(val: T) -> Self { - Self(UnsafeCell::new(val)) - } - - #[inline(always)] - pub fn get(&self) -> &mut T { - unsafe { &mut *self.0.get() } - } -} - -impl Deref for Cell { - type Target = T; - #[inline(always)] - fn deref(&self) -> &Self::Target { - self.get() - } -} - -impl DerefMut for Cell { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - self.get() - } -} diff --git a/src/framework/jinux-frame/src/lib.rs b/src/framework/jinux-frame/src/lib.rs index 48d576cb4..f90417a77 100644 --- a/src/framework/jinux-frame/src/lib.rs +++ b/src/framework/jinux-frame/src/lib.rs @@ -16,7 +16,6 @@ extern crate alloc; mod boot; -pub(crate) mod cell; pub mod config; pub mod cpu; pub mod device;