Lines Matching full:safety
14 // SAFETY: Deref + addr-of below create a temporary `TaskRef` that cannot outlive the
67 // SAFETY: By design, the only way to access a `Task` is via the `current` function or via an
73 // SAFETY: It's OK to access `Task` through shared references from other threads because we're
87 /// # Safety
104 // SAFETY: Just an FFI call with no additional safety requirements. in current()
108 // SAFETY: If the current thread is still running, the current task is valid. Given in current()
118 // SAFETY: By the type invariant, we know that `self.0` is a valid task. Valid tasks always in group_leader()
122 // SAFETY: The lifetime of the returned task reference is tied to the lifetime of `self`, in group_leader()
130 // SAFETY: By the type invariant, we know that `self.0` is a valid task. Valid tasks always in pid()
137 // SAFETY: By the type invariant, we know that `self.0` is valid. in signal_pending()
143 // SAFETY: By the type invariant, we know that `self.0.get()` is non-null and valid. in wake_up()
150 // SAFETY: The type invariants guarantee that `Task` is always ref-counted.
153 // SAFETY: The existence of a shared reference means that the refcount is nonzero. in inc_ref()
158 // SAFETY: The safety requirements guarantee that the refcount is nonzero. in dec_ref()