Lines Matching +full:b +full:- +full:side

1 // SPDX-License-Identifier: GPL-2.0
30 /// b: u32,
33 /// fn add_two(v: &Revocable<Example>) -> Option<u32> {
35 /// Some(guard.a + guard.b)
38 /// let v = KBox::pin_init(Revocable::new(Example { a: 10, b: 20 }), GFP_KERNEL).unwrap();
44 /// Sample example as above, but explicitly using the rcu read side lock.
52 /// b: u32,
55 /// fn add_two(v: &Revocable<Example>) -> Option<u32> {
58 /// Some(e.a + e.b)
61 /// let v = KBox::pin_init(Revocable::new(Example { a: 10, b: 20 }), GFP_KERNEL).unwrap();
85 pub fn new<E>(data: impl PinInit<T, E>) -> impl PinInit<Self, E> { in new()
88 data <- Opaque::pin_init(data), in new()
99 pub fn try_access(&self) -> Option<RevocableGuard<'_, T>> { in try_access()
103 // because the RCU read side lock prevents it from being dropped. in try_access()
115 /// remain accessible while the rcu read side guard is alive. In such cases, callers are not
118 pub fn try_access_with_guard<'a>(&'a self, _guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
121 // valid because the RCU read side lock prevents it from being dropped. in try_access_with_guard()
130 /// This is a convenience method to run short non-sleepable code blocks while ensuring the
140 pub fn try_access_with<R, F: FnOnce(&T) -> R>(&self, f: F) -> Option<R> { in try_access_with()
150 pub unsafe fn access(&self) -> &T { in access()
159 unsafe fn revoke_internal<const SYNC: bool>(&self) -> bool { in revoke_internal()
187 pub unsafe fn revoke_nosync(&self) -> bool { in revoke_nosync()
204 pub fn revoke(&self) -> bool { in revoke()
230 /// holding the RCU read-side lock.
234 /// The RCU read-side lock is held while the guard is alive.
246 fn new(data_ref: *const T, rcu_guard: rcu::Guard) -> Self { in new()
258 fn deref(&self) -> &Self::Target { in deref()
259 // SAFETY: By the type invariants, we hold the rcu read-side lock, so the object is in deref()