Lines Matching full:safety

37         // SAFETY: This expression creates a temporary value that is dropped at the end of the
43 // `begin_new_exec()` is responsible for safety.
98 // SAFETY: By design, the only way to access a `Task` is via the `current` function or via an
104 // SAFETY: It's OK to access `Task` through shared references from other threads because we're
162 // SAFETY: Getting the current pointer is always safe. in current_raw()
171 /// # Safety
186 // SAFETY: The returned reference borrows from this `TaskRef`, so it cannot outlive in current()
208 // SAFETY: The pid of a task never changes after initialization, so reading this field is in pid()
216 // SAFETY: It's always safe to call `task_uid` on a valid task. in uid()
223 // SAFETY: It's always safe to call `task_euid` on a valid task. in euid()
230 // SAFETY: It's always safe to call `signal_pending` on a valid task. in signal_pending()
237 // SAFETY: By the type invariant, we know that `self.0` is valid. in get_pid_ns()
242 // SAFETY: `ptr` is valid by the safety requirements of this function. And we own a in get_pid_ns()
257 // SAFETY: By the type invariant, we know that `self.0` is valid. We received a valid in tgid_nr_ns()
267 // SAFETY: It's always safe to call `wake_up_process` on a valid task, even if the task in wake_up()
279 // SAFETY: The `mm` field of `current` is not modified from other threads, so reading it is in mm()
287 // SAFETY: If `current->mm` is non-null, then it references a valid mm with a non-zero in mm()
312 // SAFETY: It is safe to call `task_active_pid_ns` without RCU protection when calling it in active_pid_ns()
329 // SAFETY: If `current`'s pid ns is non-null, then it references a valid pid ns. in active_pid_ns()
338 // SAFETY: The group leader of a task never changes while the task is running, and `self` in group_leader()
342 // SAFETY: `current->group_leader` stays valid for at least the duration in which `current` in group_leader()
349 // SAFETY: The type invariants guarantee that `Task` is always refcounted.
353 // SAFETY: The existence of a shared reference means that the refcount is nonzero. in inc_ref()
359 // SAFETY: The safety requirements guarantee that the refcount is nonzero. in dec_ref()
377 // SAFETY: Just an FFI call. in current_euid()
398 // SAFETY: Just an FFI call. in into_uid_in_current_ns()
406 // SAFETY: Just an FFI call. in eq()
429 // SAFETY: `file.as_ptr()` is valid for reading and guaranteed to be nul-terminated. in might_sleep()
433 // SAFETY: Always safe to call. in might_sleep()