pub struct FenceContext<T: FenceContextOps + Send + Sync> { /* private fields */ }Expand description
A dma-fence context. A fence context takes care of associating related fences with each other, providing each with raising sequence numbers and a common identifier.
Implementations§
Source§impl<T: FenceContextOps + Send + Sync> FenceContext<T>
impl<T: FenceContextOps + Send + Sync> FenceContext<T>
Sourcepub fn project<'__this>(
self: Pin<&'__this mut Self>,
) -> __Projection<'__this, T>
pub fn project<'__this>( self: Pin<&'__this mut Self>, ) -> __Projection<'__this, T>
Pin-projects all fields of Self.
These fields are structurally pinned:
data
These fields are not structurally pinned:
nrseqnodriver_nametimeline_namenr_of_unsignaled_fences
Sourcepub fn with_project<'__this, R>(
self: Pin<&'__this mut Self>,
f: impl FnOnce(__ProjectionLt<'__this, T>) -> R,
) -> R
pub fn with_project<'__this, R>( self: Pin<&'__this mut Self>, f: impl FnOnce(__ProjectionLt<'__this, T>) -> R, ) -> R
Pin-projects all fields of Self with proper lifetime.
These fields are structurally pinned:
data
These fields are not structurally pinned:
nrseqnodriver_nametimeline_namenr_of_unsignaled_fences
Sourcepub fn with_project_ref<'__this, R>(
self: Pin<&'__this Self>,
f: impl FnOnce(__ProjectionRef<'__this, T>) -> R,
) -> R
pub fn with_project_ref<'__this, R>( self: Pin<&'__this Self>, f: impl FnOnce(__ProjectionRef<'__this, T>) -> R, ) -> R
Pin-projects all fields of Self from a shared reference with proper lifetime.
These fields are structurally pinned:
data
These fields are not structurally pinned:
nrseqnodriver_nametimeline_namenr_of_unsignaled_fences
Source§impl<'a, T: Send + Sync + FenceContextOps> FenceContext<T>
impl<'a, T: Send + Sync + FenceContextOps> FenceContext<T>
Sourcepub fn new<E>(
initial_seqno: u64,
driver_name: &CStr,
timeline_name: &CStr,
data: impl PinInit<T, E>,
) -> impl PinInit<Self, Error>
pub fn new<E>( initial_seqno: u64, driver_name: &CStr, timeline_name: &CStr, data: impl PinInit<T, E>, ) -> impl PinInit<Self, Error>
Create a new FenceContext.
Sourcepub fn new_fence_allocation(
&self,
data: T::FenceDataType,
) -> Result<DriverFenceAllocation<'_, T>>
pub fn new_fence_allocation( &self, data: T::FenceDataType, ) -> Result<DriverFenceAllocation<'_, T>>
Allocate the memory for a DriverFence and already store data inside.
This is needed because many times, creation of a DriverFence must not
fail, and allocating might deadlock in some situations.
The data you pass here must not perform any operations that are illegal
in atomic context in its Drop implementation.
Trait Implementations§
Source§impl<T: FenceContextOps + Send + Sync> Drop for FenceContext<T>
impl<T: FenceContextOps + Send + Sync> Drop for FenceContext<T>
Source§impl<T: FenceContextOps + Send + Sync> HasPinData for FenceContext<T>
impl<T: FenceContextOps + Send + Sync> HasPinData for FenceContext<T>
Source§impl<T: FenceContextOps + Send + Sync> PinnedDrop for FenceContext<T>
impl<T: FenceContextOps + Send + Sync> PinnedDrop for FenceContext<T>
Auto Trait Implementations§
impl<T> !Freeze for FenceContext<T>
impl<T> !RefUnwindSafe for FenceContext<T>
impl<T> Send for FenceContext<T>
impl<T> Sync for FenceContext<T>
impl<T> UnsafeUnpin for FenceContext<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FenceContext<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
self into a T. This operation is guaranteed to be lossless.