Lines Matching +full:multi +full:- +full:tt

1 // SPDX-License-Identifier: GPL-2.0
11 //! generic, they are used only at compile-time, so they shouldn't exist in the final binary.
51 //! fn new(value: i32) -> Result<Arc<Self>> {
54 //! work <- new_work!("MyStruct::work"),
97 //! fn new(value_1: i32, value_2: i32) -> Result<Arc<Self>> {
101 //! work_1 <- new_work!("MyStruct::work_1"),
102 //! work_2 <- new_work!("MyStruct::work_2"),
140 /// Creates a [`Work`] initialiser with the given name and a newly-created lock class.
158 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
160 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
170 pub unsafe fn from_raw<'a>(ptr: *const bindings::workqueue_struct) -> &'a Queue { in from_raw()
181 pub fn enqueue<W, const ID: u64>(&self, w: W) -> W::EnqueueOutput in enqueue()
216 ) -> Result<(), AllocError> { in try_spawn()
218 work <- new_work!("Queue::try_spawn"), in try_spawn()
238 fn project(self: Pin<&mut Self>) -> &mut Option<T> { in project()
256 /// This is the low-level trait that is designed for being as general as possible.
296 unsafe fn __enqueue<F>(self, queue_work_on: F) -> Self::EnqueueOutput in __enqueue()
298 F: FnOnce(*mut bindings::work_struct) -> bool; in __enqueue()
372 pub fn new(name: &'static CStr, key: &'static LockClassKey) -> impl PinInit<Self> in new()
377 work <- Opaque::ffi_init(|slot| { in new()
401 pub unsafe fn raw_get(ptr: *const Self) -> *mut bindings::work_struct { in raw_get()
448 fn get_work_offset(&self) -> usize { in get_work_offset()
458 unsafe fn raw_get_work(ptr: *mut Self) -> *mut Work<T, ID> { in raw_get_work()
469 unsafe fn work_container_of(ptr: *mut Work<T, ID>) -> *mut Self in work_container_of()
499 ($(impl$({$($generics:tt)*})?
500 HasWork<$work_type:ty $(, $id:tt)?>
510 … unsafe fn raw_get_work(ptr: *mut Self) -> *mut $crate::workqueue::Work<$work_type $(, $id)?> {
527 // - `__enqueue` gets the `work_struct` from the `Work` field, using `T::raw_get_work`.
528 // - The only safe way to create a `Work` object is through `Work::new`.
529 // - `Work::new` makes sure that `T::Pointer::run` is passed to `init_work_with_key`.
530 // - Finally `Work` and `RawWorkItem` guarantee that the correct `Work` field
565 unsafe fn __enqueue<F>(self, queue_work_on: F) -> Self::EnqueueOutput in __enqueue()
567 F: FnOnce(*mut bindings::work_struct) -> bool, in __enqueue()
614 unsafe fn __enqueue<F>(self, queue_work_on: F) -> Self::EnqueueOutput in __enqueue()
616 F: FnOnce(*mut bindings::work_struct) -> bool, in __enqueue()
638 /// It is the one used by `schedule[_delayed]_work[_on]()`. Multi-CPU multi-threaded. There are
642 pub fn system() -> &'static Queue { in system()
647 /// Returns the system high-priority work queue (`system_highpri_wq`).
651 pub fn system_highpri() -> &'static Queue { in system_highpri()
656 /// Returns the system work queue for potentially long-running work items (`system_long_wq`).
660 pub fn system_long() -> &'static Queue { in system_long()
670 pub fn system_unbound() -> &'static Queue { in system_unbound()
681 pub fn system_freezable() -> &'static Queue { in system_freezable()
686 /// Returns the system power-efficient work queue (`system_power_efficient_wq`).
691 pub fn system_power_efficient() -> &'static Queue { in system_power_efficient()
696 /// Returns the system freezable power-efficient work queue (`system_freezable_power_efficient_wq`).
702 pub fn system_freezable_power_efficient() -> &'static Queue { in system_freezable_power_efficient()