make FilePointer Send/Sync
This commit is contained in:
parent
f3915db754
commit
750a966c62
@ -50,13 +50,17 @@ type U64 = zerocopy::byteorder::U64<LE>;
|
||||
type U32 = zerocopy::byteorder::U32<LE>;
|
||||
type U16 = zerocopy::byteorder::U16<LE>;
|
||||
|
||||
// TODO: what is the correct PhantomData for this type
|
||||
#[derive(FromBytes, FromZeroes, AsBytes, Unaligned)]
|
||||
#[repr(transparent)]
|
||||
pub struct FilePointer<T> {
|
||||
inner: RawFilePointer,
|
||||
_phantom: PhantomData<*const T>,
|
||||
_phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
unsafe impl<T> Send for FilePointer<T> {}
|
||||
unsafe impl<T> Sync for FilePointer<T> {}
|
||||
|
||||
impl<T> Clone for FilePointer<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
|
Loading…
Reference in New Issue
Block a user