Closed phil-opp closed 1 year ago
My initial thought was on using AtomicPtr
to atomically move the pointer between cores. This would model Option<&mut T>
or Option<AtomicPtrSend>
. Thinking about it, I can't find much use for that over a SpinMutex<AtomicPtrSend>
, though.
Using atomic types for MMIO data would have the existing issue regarding references and dereferencable
. One could use intrinsics like core::intrinsics::atomic_load_relaxed
, but intrinsics are never intended to be stabilized.
Ah, thanks for clarifying! In that case, let's postpone this idea for now untl a potential use-case comes up.
Using atomic types for MMIO data would have the existing issue regarding references and
dereferencable
. One could use intrinsics likecore::intrinsics::atomic_load_relaxed
, but intrinsics are never intended to be stabilized.
Yeah, good point.
Proposed by @mkroening in https://github.com/rust-osdev/volatile/pull/29#issuecomment-1398132992.