Lines Matching +full:always +full:- +full:running
1 // SPDX-License-Identifier: GPL-2.0
26 /// Returns the currently running task.
30 // SAFETY: Deref + addr-of below create a temporary `TaskRef` that cannot outlive the
42 /// Instances of this type are always refcounted, that is, a call to `get_task_struct` ensures
72 /// fn new() -> Self {
106 pub unsafe fn current() -> impl Deref<Target = Task> { in current()
115 fn deref(&self) -> &Self::Target { in current()
124 // SAFETY: If the current thread is still running, the current task is valid. Given in current()
133 pub fn group_leader(&self) -> &Task { in group_leader()
134 // SAFETY: By the type invariant, we know that `self.0` is a valid task. Valid tasks always in group_leader()
145 pub fn pid(&self) -> Pid { in pid()
146 // SAFETY: By the type invariant, we know that `self.0` is a valid task. Valid tasks always in pid()
152 pub fn signal_pending(&self) -> bool { in signal_pending()
159 // SAFETY: By the type invariant, we know that `self.0.get()` is non-null and valid. in wake_up()
161 // running. in wake_up()
166 // SAFETY: The type invariants guarantee that `Task` is always refcounted.