pub struct Bti(/* private fields */);Expand description
An object representing a Zircon Bus Transaction Initiator object. See BTI Documentation for details.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
Source§impl Bti
impl Bti
Sourcepub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn invalid() -> Bti
pub fn is_invalid(&self) -> bool
Sourcepub fn into_raw(self) -> u32
pub fn into_raw(self) -> u32
Return the raw handle’s integer value without closing it when self is dropped.
Sourcepub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a [HandleRef] referring to this handle.
Sourcepub fn duplicate_handle(&self, rights: Rights) -> Result<Bti, Status>
pub fn duplicate_handle(&self, rights: Rights) -> Result<Bti, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn replace_handle(self, rights: Rights) -> Result<Bti, Status>
pub fn replace_handle(self, rights: Rights) -> Result<Bti, Status>
Wraps the
zx_handle_replace
syscall.
Sourcepub fn into_handle(self) -> NullableHandle
pub fn into_handle(self) -> NullableHandle
Converts the value into its inner handle.
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: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Sourcepub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
Sourcepub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
pub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
Return a WaitItem for this handle and the provided signals to use with
object_wait_many.
Sourcepub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
Sourcepub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
Source§impl Bti
impl Bti
pub fn create(iommu: &Iommu, id: u64) -> Result<Bti, Status>
Sourcepub fn info(&self) -> Result<BtiInfo, Status>
pub fn info(&self) -> Result<BtiInfo, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_BTI topic.
pub fn pin( &self, options: BtiOptions, vmo: &Vmo, offset: u64, size: u64, out_paddrs: &mut [usize], ) -> Result<Pmt, Status>
Sourcepub unsafe fn release_quarantine(&self) -> Result<(), Status>
pub unsafe fn release_quarantine(&self) -> Result<(), Status>
Releases all quarantined PMTs for the given BTI.
Wraps the zx_bti_release_quarantine
system call.
§Safety
The caller must ensure that the hardware is in a state where it is no longer attempting to access the memory unpinned by this call. Otherwise, without an IOMMU, this can cause arbitrary memory corruption.
Trait Implementations§
Source§impl AsHandleRef for Bti
impl AsHandleRef for Bti
Source§fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
object_wait_many.