Lines Matching +full:sync +full:- +full:read
1 // SPDX-License-Identifier: GPL-2.0
3 //! Sleepable read-copy update (SRCU) support.
11 sync::LockClassKey,
20 /// Creates an [`Srcu`] initialiser with the given name and a newly-created lock class.
25 $crate::sync::Srcu::new($crate::optional_name!($($name)?), $crate::static_lock_class!())
30 /// Sleepable read-copy update primitive.
32 /// SRCU readers may sleep while holding the read-side guard.
35 /// If a read-side guard has been leaked, dropping an [`Srcu`] may never return.
51 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self, Error> { in new()
55 inner <- Opaque::try_ffi_init(|ptr: *mut bindings::srcu_struct| { in new()
64 /// Enters an SRCU read-side critical section.
66 /// Leaking the returned [`Guard`] leaves the SRCU read-side critical
69 pub fn read_lock(&self) -> Guard<'_> { in read_lock()
81 /// Waits until all pre-existing SRCU readers have completed.
88 /// Waits until all pre-existing SRCU readers have completed, expedited.
90 /// This requests a lower-latency grace period than [`Srcu::synchronize`] typically
91 /// at the cost of higher system-wide overhead. Prefer [`Srcu::synchronize`] by default
141 unsafe impl Sync for Srcu {}
143 /// Guard for an active SRCU read-side critical section on a particular [`Srcu`].
145 /// Leaking this guard with [`core::mem::forget`] leaves the SRCU read-side
159 /// Explicitly releases the SRCU read-side critical section.