Lines Matching full:safety

250 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
252 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
258 /// # Safety
263 // SAFETY: The `Queue` type is `#[repr(transparent)]`, so the pointer cast is valid. The
279 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other
312 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other
317 // this closure, and the safety requirements of `RawDelayedWorkItem` expands this
388 /// # Safety
408 /// # Safety
424 /// # Safety
443 /// # Safety
453 /// # Safety
492 // SAFETY: Kernel work items are usable from any thread.
496 // SAFETY: Kernel work items are usable from any thread.
510 // SAFETY: The `WorkItemPointer` implementation promises that `run` can be used as
528 /// # Safety
534 // SAFETY: The caller promises that the pointer is aligned and not dangling.
562 /// # Safety
575 /// # Safety
582 /// # Safety
613 // SAFETY: The implementation of `raw_get_work` only compiles if the field has the right
618 // SAFETY: The caller promises that the pointer is not dangling.
628 // SAFETY: The caller promises that the pointer points at a field of the right type
660 // SAFETY: Kernel work items are usable from any thread.
664 // SAFETY: Kernel work items are usable from any thread.
683 // SAFETY: The `WorkItemPointer` implementation promises that `run` can be used as
695 // SAFETY: The `delayed_work_timer_fn` function pointer can be used here because
714 /// # Safety
720 // SAFETY: The caller promises that the pointer is aligned and not dangling.
723 // SAFETY: The caller promises that the pointer is aligned and not dangling.
732 /// # Safety
766 // SAFETY: The implementation of `raw_get_work` only compiles if the field has the right
771 // SAFETY: The implementation of `raw_get_work` only compiles if the field has the right
778 // SAFETY: The caller promises that the pointer is not dangling.
783 // SAFETY: The caller promises that the pointer is not dangling.
791 // SAFETY: The caller promises that the pointer points at a field of the right type
795 // SAFETY: The caller promises that the pointer points at a field of the right type
804 // SAFETY: The caller promises that the pointer points at a field of the right type
813 // SAFETY: The `__enqueue` implementation in RawWorkItem uses a `work_struct` initialized with the
830 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
832 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership.
839 // SAFETY: The `work_struct` raw pointer is guaranteed to be valid for the duration of the call to
844 // is what the function pointer in the `work_struct` must be pointing to, according to the safety
860 // SAFETY: Pointers into an `Arc` point at a valid value.
862 // SAFETY: `raw_get_work` returns a pointer to a valid value.
868 // SAFETY: The work queue has not taken ownership of the pointer.
874 // SAFETY: By the safety requirements of `HasDelayedWork`, the `work_struct` returned by methods in
884 // SAFETY: TODO.
893 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
895 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership.
897 // SAFETY: The box was already pinned when it was enqueued.
904 // SAFETY: TODO.
916 // SAFETY: We're not going to move `self` or any of its fields, so its okay to temporarily
921 // SAFETY: Pointers into a `KBox` point at a valid value.
923 // SAFETY: `raw_get_work` returns a pointer to a valid value.
927 // SAFETY: This method requires exclusive ownership of the box, so it cannot be in a
934 // SAFETY: By the safety requirements of `HasDelayedWork`, the `work_struct` returned by methods in
944 // SAFETY: Like the `Arc<T>` implementation, the `__enqueue` implementation for
946 // `T::raw_get_work`, so the same safety reasoning applies:
965 // SAFETY: This computes the pointer that `__enqueue` got from
969 // SAFETY: The safety contract of `work_container_of` ensures that it
973 // SAFETY: This pointer comes from `ARef::into_raw` and we've been given
981 // SAFETY: The `work_struct` raw pointer is guaranteed to be valid for the duration of the call to
986 // is what the function pointer in the `work_struct` must be pointing to, according to the safety
1002 // SAFETY: Pointers from ARef::into_raw are valid and non-null.
1004 // SAFETY: `raw_get_work` returns a pointer to a valid value.
1010 // SAFETY: The work queue has not taken ownership of the pointer.
1016 // SAFETY: By the safety requirements of `HasDelayedWork`, the `work_struct` returned by methods in
1034 // SAFETY: `system_wq` is a C global, always available.
1043 // SAFETY: `system_highpri_wq` is a C global, always available.
1052 // SAFETY: `system_long_wq` is a C global, always available.
1062 // SAFETY: `system_unbound_wq` is a C global, always available.
1073 // SAFETY: `system_freezable_wq` is a C global, always available.
1083 // SAFETY: `system_power_efficient_wq` is a C global, always available.
1094 // SAFETY: `system_freezable_power_efficient_wq` is a C global, always available.
1103 // SAFETY: `system_bh_wq` is a C global, always available.
1112 // SAFETY: `system_bh_highpri_wq` is a C global, always available.