Lines Matching full:safety

160 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
162 // SAFETY: Accesses to workqueues used by [`Queue`] are thread-safe.
168 /// # Safety
173 // SAFETY: The `Queue` type is `#[repr(transparent)]`, so the pointer cast is valid. The in from_raw()
189 // SAFETY: We only return `false` if the `work_struct` is already in a workqueue. The other in enqueue()
231 // SAFETY: The `func` field is not structurally pinned. in project()
259 /// # Safety
277 /// # Safety
300 /// # Safety
310 /// # Safety
343 // SAFETY: Kernel work items are usable from any thread.
347 // SAFETY: Kernel work items are usable from any thread.
360 // SAFETY: The `WorkItemPointer` implementation promises that `run` can be used as the work in new()
379 /// # Safety
385 // SAFETY: The caller promises that the pointer is aligned and not dangling. in raw_get()
415 /// # Safety
442 /// # Safety
449 // SAFETY: The caller promises that the pointer is valid. in raw_get_work()
455 /// # Safety
465 // SAFETY: The caller promises that the pointer points at a field of the right type in the in work_container_of()
497 // SAFETY: The implementation of `raw_get_work` only compiles if the field has the right
504 // SAFETY: The caller promises that the pointer is not dangling.
523 // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`. in run()
525 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`. in run()
527 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership. in run()
548 // SAFETY: Pointers into an `Arc` point at a valid value. in __enqueue()
550 // SAFETY: `raw_get_work` returns a pointer to a valid value. in __enqueue()
556 // SAFETY: The work queue has not taken ownership of the pointer. in __enqueue()
568 // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`. in run()
570 // SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`. in run()
572 // SAFETY: This pointer comes from `Arc::into_raw` and we've been given back ownership. in run()
574 // SAFETY: The box was already pinned when it was enqueued. in run()
592 // SAFETY: We're not going to move `self` or any of its fields, so its okay to temporarily in __enqueue()
597 // SAFETY: Pointers into a `Box` point at a valid value. in __enqueue()
599 // SAFETY: `raw_get_work` returns a pointer to a valid value. in __enqueue()
603 // SAFETY: This method requires exclusive ownership of the box, so it cannot be in a in __enqueue()
617 // SAFETY: `system_wq` is a C global, always available. in system()
626 // SAFETY: `system_highpri_wq` is a C global, always available. in system_highpri()
635 // SAFETY: `system_long_wq` is a C global, always available. in system_long()
645 // SAFETY: `system_unbound_wq` is a C global, always available. in system_unbound()
656 // SAFETY: `system_freezable_wq` is a C global, always available. in system_freezable()
666 // SAFETY: `system_power_efficient_wq` is a C global, always available. in system_power_efficient()
677 // SAFETY: `system_freezable_power_efficient_wq` is a C global, always available. in system_freezable_power_efficient()