pub unsafe trait RcuReadContext: RcuContext {
type Guard<'a>: RcuGuard<Flavor = Self::Flavor> + 'a
where Self: 'a;
// Required methods
fn rcu_read_lock(&self) -> Self::Guard<'_>;
fn rcu_call<F>(&self, callback: Box<F>)
where F: RcuCall + Send + 'static;
}Expand description
This trait defines the per-thread RCU read context.
§Safety
For callbacks (rcu_call), a barrier (rcu_barrier) should be executed
before cleaning up the context. Failure to do so might results in memory
leaks and object cleanups that don’t happen.
Required Associated Types§
Required Methods§
Sourcefn rcu_read_lock(&self) -> Self::Guard<'_>
fn rcu_read_lock(&self) -> Self::Guard<'_>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<const DEFER: bool> RcuReadContext for RcuContextBp<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
impl<const DEFER: bool> RcuReadContext for RcuContextBp<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
type Guard<'a> = RcuGuardBp<'a>
Source§impl<const DEFER: bool> RcuReadContext for RcuContextMb<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
impl<const DEFER: bool> RcuReadContext for RcuContextMb<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
type Guard<'a> = RcuGuardMb<'a>
Source§impl<const DEFER: bool> RcuReadContext for RcuContextMemb<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
impl<const DEFER: bool> RcuReadContext for RcuContextMemb<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
type Guard<'a> = RcuGuardMemb<'a>
Source§impl<const DEFER: bool> RcuReadContext for RcuContextQsbr<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.
impl<const DEFER: bool> RcuReadContext for RcuContextQsbr<true, DEFER>
§Safety
call_rcu barrier is called before cleanups.