Home
last modified time | relevance | path

Searched refs:Guard (Results 1 – 9 of 9) sorted by relevance

/rust/kernel/sync/
A Drcu.rs16 pub struct Guard(NotThreadSafe); struct
18 impl Guard { impls
33 impl Default for Guard { implementation
40 impl Drop for Guard { implementation
50 pub fn read_lock() -> Guard { in read_lock()
51 Guard::new() in read_lock()
A Dlock.rs167 pub fn lock(&self) -> Guard<'_, T, B> { in lock()
172 unsafe { Guard::new(self, state) } in lock()
180 pub fn try_lock(&self) -> Option<Guard<'_, T, B>> { in try_lock()
183 unsafe { B::try_lock(self.state.get()).map(|state| Guard::new(self, state)) } in try_lock()
193 pub struct Guard<'a, T: ?Sized, B: Backend> { struct
200 unsafe impl<T: Sync + ?Sized, B: Backend> Sync for Guard<'_, T, B> {} implementation
202 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> { impls
245 impl<T: ?Sized, B: Backend> core::ops::Deref for Guard<'_, T, B> { implementation
254 impl<T: ?Sized, B: Backend> core::ops::DerefMut for Guard<'_, T, B> { implementation
261 impl<T: ?Sized, B: Backend> Drop for Guard<'_, T, B> { implementation
[all …]
A Dcondvar.rs8 use super::{lock::Backend, lock::Guard, LockClassKey};
117 guard: &mut Guard<'_, T, B>, in wait_internal()
145 pub fn wait<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) { in wait()
156 pub fn wait_interruptible<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) -> bool { in wait_interruptible()
170 guard: &mut Guard<'_, T, B>, in wait_interruptible_freezable()
188 guard: &mut Guard<'_, T, B>, in wait_interruptible_timeout()
/rust/kernel/
A Dxarray.rs122 pub fn try_lock(&self) -> Option<Guard<'_, T>> { in try_lock()
125 Some(Guard { in try_lock()
135 pub fn lock(&self) -> Guard<'_, T> { in lock()
139 Guard { in lock()
150 pub struct Guard<'a, T: ForeignOwnable> { struct
155 impl<T: ForeignOwnable> Drop for Guard<'_, T> { implementation
180 impl<'a, T: ForeignOwnable> Guard<'a, T> { implementation
A Drevocable.rs118 pub fn try_access_with_guard<'a>(&'a self, _guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
241 _rcu_guard: rcu::Guard,
246 fn new(data_ref: *const T, rcu_guard: rcu::Guard) -> Self { in new()
A Ddevres.rs262 pub fn try_access_with_guard<'a>(&'a self, guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
/rust/kernel/sync/lock/
A Dmutex.rs95 pub type MutexGuard<'a, T> = super::Guard<'a, T, MutexBackend>;
A Dspinlock.rs96 pub type SpinLockGuard<'a, T> = super::Guard<'a, T, SpinLockBackend>;
A Dglobal.rs9 sync::lock::{Backend, Guard, Lock},
98 inner: Guard<'static, B::Item, B::Backend>,

Completed in 13 milliseconds