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>
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
Mutably borrows from an owned value. Read more
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
Convert
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
Convert
self into a T. This operation is guaranteed to be lossless.