Lines Matching +full:pin +full:- +full:switches
1 // SPDX-License-Identifier: GPL-2.0
18 use core::{marker::PhantomPinned, pin::Pin, ptr};
21 /// Creates a [`CondVar`] initialiser with the given name and a newly-created lock class.
50 /// #[pin]
53 /// #[pin]
72 /// fn new_example() -> Result<Pin<KBox<Example>>> {
74 /// value <- new_mutex!(0),
75 /// value_changed <- new_condvar!(),
83 #[pin]
87 /// self-referential, so it cannot be safely moved once it is initialised.
90 #[pin]
103 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new()
108 wait_queue_head <- Opaque::ffi_init(|slot| unsafe { in new()
119 ) -> c_long { in wait_internal()
130 // SAFETY: Switches to another thread. The timeout can be any number. in wait_internal()
156 pub fn wait_interruptible<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) -> bool { in wait_interruptible()
171 ) -> bool { in wait_interruptible_freezable()
190 ) -> CondVarTimeoutResult { in wait_interruptible_timeout()