Lines Matching full:workqueue

25 //!  * The [`WorkItem`] trait is implemented for structs that can be enqueued to a workqueue.
31 //! This example defines a struct that holds an integer and can be scheduled on the workqueue. When
37 //! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
67 //! /// This method will enqueue the struct for execution on the system workqueue, where its value
70 //! let _ = workqueue::system().enqueue(val);
79 //! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
124 //! let _ = workqueue::system().enqueue::<Arc<MyStruct>, 1>(val);
128 //! let _ = workqueue::system().enqueue::<Arc<MyStruct>, 2>(val);
138 //! use kernel::workqueue::{self, impl_has_delayed_work, new_delayed_work, DelayedWork, WorkItem};
171 //! /// This method will enqueue the struct for execution on the system workqueue, where its value
174 //! let _ = workqueue::system().enqueue_delayed(val, 12);
180 //! let _ = workqueue::system().enqueue(val);
186 //! C header: [`include/linux/workqueue.h`](srctree/include/linux/workqueue.h)
203 $crate::workqueue::Work::new($crate::optional_name!($($name)?), $crate::static_lock_class!())
212 $crate::workqueue::DelayedWork::new(
225 $crate::workqueue::DelayedWork::new(
255 /// valid workqueue, and that it remains valid until the end of `'a`.
264 /// This may fail if the work item is already enqueued in a workqueue.
273 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other
280 // Furthermore, if the C workqueue code accesses the pointer after this call to
297 /// This may fail if the work item is already enqueued in a workqueue.
306 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other
314 // Furthermore, if the C workqueue code accesses the pointer after this call to
404 /// The provided closure may only return `false` if the `work_struct` is already in a workqueue.
470 /// trait, and defines the linked list pointers necessary to enqueue a work item in a workqueue.
541 /// use kernel::workqueue::{impl_has_work, Work};
587 /// use kernel::workqueue::{self, impl_has_work, Work};
608 unsafe impl$(<$($generics)+>)? $crate::workqueue::HasWork<$work_type $(, $id)?> for $self {
610 unsafe fn raw_get_work(ptr: *mut Self) -> *mut $crate::workqueue::Work<$work_type $(, $id)?> {
619 ptr: *mut $crate::workqueue::Work<$work_type $(, $id)?>,
637 /// trait, and defines the linked list pointers necessary to enqueue a work item in a workqueue in
690 // the core workqueue code, and configured to run in irqsafe context.
740 /// use kernel::workqueue::{self, impl_has_delayed_work, DelayedWork};
762 $crate::workqueue::HasDelayedWork<$work_type $(, $id)?> for $self {}
766 unsafe impl$(<$($generics)+>)? $crate::workqueue::HasWork<$work_type $(, $id)?> for $self {
770 ) -> *mut $crate::workqueue::Work<$work_type $(, $id)?> {
772 let ptr: *mut $crate::workqueue::DelayedWork<$work_type $(, $id)?> = unsafe {
777 unsafe { $crate::workqueue::DelayedWork::raw_as_work(ptr) }
782 ptr: *mut $crate::workqueue::Work<$work_type $(, $id)?>,
786 let ptr = unsafe { $crate::workqueue::Work::raw_get(ptr) };
794 let delayed_work: *mut $crate::workqueue::DelayedWork<$work_type $(, $id)?> =
921 // workqueue.
980 /// A freezable workqueue participates in the freeze phase of the system suspend operations. Work
981 /// items on the workqueue are drained and no new work item starts execution until thawed.
990 /// `workqueue.power_efficient` kernel parameter is specified; otherwise, it is similar to the one
1001 /// A freezable workqueue participates in the freeze phase of the system suspend operations. Work
1002 /// items on the workqueue are drained and no new work item starts execution until thawed.