Lines Matching full:safety

34         // SAFETY: Deref + addr-of below create a temporary `TaskRef` that cannot outlive the
44 // SAFETY: Deref + addr-of below create a temporary `PidNamespaceRef` that cannot outlive
97 // SAFETY: By design, the only way to access a `Task` is via the `current` function or via an
103 // SAFETY: It's OK to access `Task` through shared references from other threads because we're
123 // SAFETY: Getting the current pointer is always safe. in current_raw()
132 /// # Safety
151 // SAFETY: If the current thread is still running, the current task is valid. Given in current()
166 /// # Safety
237 // SAFETY: The current task's pid namespace is valid as long as the current task is running. in current_pid_ns()
240 // SAFETY: If the current thread is still running, the current task and its associated in current_pid_ns()
258 // SAFETY: The group leader of a task never changes after initialization, so reading this in group_leader()
262 // SAFETY: The lifetime of the returned task reference is tied to the lifetime of `self`, in group_leader()
270 // SAFETY: The pid of a task never changes after initialization, so reading this field is in pid()
277 // SAFETY: It's always safe to call `task_uid` on a valid task. in uid()
283 // SAFETY: It's always safe to call `task_euid` on a valid task. in euid()
289 // SAFETY: It's always safe to call `signal_pending` on a valid task. in signal_pending()
295 // SAFETY: By the type invariant, we know that `self.0` is valid. in get_pid_ns()
300 // SAFETY: `ptr` is valid by the safety requirements of this function. And we own a in get_pid_ns()
314 // SAFETY: By the type invariant, we know that `self.0` is valid. We received a valid in tgid_nr_ns()
323 // SAFETY: It's always safe to call `wake_up_process` on a valid task, even if the task in wake_up()
329 // SAFETY: The type invariants guarantee that `Task` is always refcounted.
332 // SAFETY: The existence of a shared reference means that the refcount is nonzero. in inc_ref()
337 // SAFETY: The safety requirements guarantee that the refcount is nonzero. in dec_ref()
346 // SAFETY: Just an FFI call. in current_euid()
367 // SAFETY: Just an FFI call. in into_uid_in_current_ns()
375 // SAFETY: Just an FFI call. in eq()