Lines Matching full:safety
158 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
160 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
166 /// # Safety
171 // SAFETY: The `Queue` type is `#[repr(transparent)]`, so the pointer cast is valid. The in from_raw()
187 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other in enqueue()
239 // SAFETY: The `func` field is not structurally pinned. in project()
267 /// # Safety
287 /// # Safety
311 /// # Safety
321 /// # Safety
360 // SAFETY: Kernel work items are usable from any thread.
364 // SAFETY: Kernel work items are usable from any thread.
378 // SAFETY: The `WorkItemPointer` implementation promises that `run` can be used as in new()
396 /// # Safety
402 // SAFETY: The caller promises that the pointer is aligned and not dangling. in raw_get()
430 /// # Safety
454 /// # Safety
459 // SAFETY: The caller promises that the pointer is valid. in raw_get_work()
465 /// # Safety
473 // SAFETY: The caller promises that the pointer points at a field of the right type in the in work_container_of()
504 // SAFETY: The implementation of `raw_get_work` only compiles if the field has the right
511 // SAFETY: The caller promises that the pointer is not dangling.
525 // SAFETY: The `__enqueue` implementation in RawWorkItem uses a `work_struct` initialized with the
542 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`. in run()
544 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership. in run()
551 // SAFETY: The `work_struct` raw pointer is guaranteed to be valid for the duration of the call to
556 // is what the function pointer in the `work_struct` must be pointing to, according to the safety
572 // SAFETY: Pointers into an `Arc` point at a valid value. in __enqueue()
574 // SAFETY: `raw_get_work` returns a pointer to a valid value. in __enqueue()
580 // SAFETY: The work queue has not taken ownership of the pointer. in __enqueue()
586 // SAFETY: TODO.
595 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`. in run()
597 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership. in run()
599 // SAFETY: The box was already pinned when it was enqueued. in run()
606 // SAFETY: TODO.
618 // SAFETY: We're not going to move `self` or any of its fields, so its okay to temporarily in __enqueue()
623 // SAFETY: Pointers into a `KBox` point at a valid value. in __enqueue()
625 // SAFETY: `raw_get_work` returns a pointer to a valid value. in __enqueue()
629 // SAFETY: This method requires exclusive ownership of the box, so it cannot be in a in __enqueue()
643 // SAFETY: `system_wq` is a C global, always available. in system()
652 // SAFETY: `system_highpri_wq` is a C global, always available. in system_highpri()
661 // SAFETY: `system_long_wq` is a C global, always available. in system_long()
671 // SAFETY: `system_unbound_wq` is a C global, always available. in system_unbound()
682 // SAFETY: `system_freezable_wq` is a C global, always available. in system_freezable()
692 // SAFETY: `system_power_efficient_wq` is a C global, always available. in system_power_efficient()
703 // SAFETY: `system_freezable_power_efficient_wq` is a C global, always available. in system_freezable_power_efficient()