pub struct Pmt(/* private fields */);Expand description
An object representing a Zircon Pinned Memory Token. See PMT Documentation for details.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
Source§impl Pmt
impl Pmt
Sourcepub fn into_raw(self) -> zx_handle_t
pub fn into_raw(self) -> zx_handle_t
Return the raw handle’s integer value without closing it when self is dropped.
Sourcepub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn replace(self, rights: Rights) -> Result<Self, Status>
pub fn replace(self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_replace
syscall.
Sourcepub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
Sourcepub fn wait_one(
&self,
signals: Signals,
deadline: MonotonicInstant,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: MonotonicInstant, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Source§impl Pmt
impl Pmt
Sourcepub unsafe fn unpin(self) -> Result<(), Status>
pub unsafe fn unpin(self) -> Result<(), Status>
Unpins a Pinned Memory Token.
Wraps the
zx_pmt_unpin system call
to unpin a pmt.
This function is marked unsafe because calling it at the wrong time (i.e., while hardware
is still accessing the pinned memory) can lead to memory corruption.
§Safety
The caller must ensure hardware is no longer accessing the memory that has been pinned or else risk arbitrary memory corruption. It is strongly recommended you do not call this in a drop method.
Trait Implementations§
Source§impl AsHandleRef for Pmt
impl AsHandleRef for Pmt
Source§fn as_handle_ref(&self) -> HandleRef<'_>
fn as_handle_ref(&self) -> HandleRef<'_>
object_wait_many.