Lines Matching +full:wait +full:- +full:pin
1 // SPDX-License-Identifier: GPL-2.0
13 /// Creates a [`CondVar`] initialiser with the given name and a newly-created lock class.
42 /// #[pin]
45 /// #[pin]
64 /// fn new_example() -> Result<Pin<Box<Example>>> {
66 /// value <- new_mutex!(0),
67 /// value_changed <- new_condvar!(),
72 /// [`struct wait_queue_head`]: ../../../include/linux/wait.h
75 #[pin]
79 /// self-referential, so it cannot be safely moved once it is initialised.
80 #[pin]
95 pub fn new(name: &'static CStr, key: &'static LockClassKey) -> impl PinInit<Self> { in new()
100 wait_list <- Opaque::ffi_init(|slot| unsafe { in new()
107 let wait = Opaque::<bindings::wait_queue_entry>::uninit(); in wait_internal() localVariable
109 // SAFETY: `wait` points to valid memory. in wait_internal()
110 unsafe { bindings::init_wait(wait.get()) }; in wait_internal()
112 // SAFETY: Both `wait` and `wait_list` point to valid memory. in wait_internal()
114 bindings::prepare_to_wait_exclusive(self.wait_list.get(), wait.get(), wait_state as _) in wait_internal()
120 // SAFETY: Both `wait` and `wait_list` point to valid memory. in wait_internal()
121 unsafe { bindings::finish_wait(self.wait_list.get(), wait.get()) }; in wait_internal()
132 #[must_use = "wait returns if a signal is pending, so the caller must check the return value"]
133 pub fn wait<T: ?Sized, B: Backend>(&self, guard: &mut Guard<'_, T, B>) -> bool { in wait() method
140 /// Similar to [`CondVar::wait`], except that the wait is not interruptible. That is, the