obkrnl/uma/
boxed.rs

1use core::ops::Deref;
2
3/// Encapsulates an object allocated from a UMA zone.
4pub struct UmaBox<T: ?Sized>(*mut T);
5
6impl<T: ?Sized> Deref for UmaBox<T> {
7    type Target = T;
8
9    fn deref(&self) -> &Self::Target {
10        unsafe { &*self.0 }
11    }
12}
13
14unsafe impl<T: Send + ?Sized> Send for UmaBox<T> {}
15unsafe impl<T: Sync + ?Sized> Sync for UmaBox<T> {}