Lines Matching +full:cost +full:- +full:effective

1 // SPDX-License-Identifier: GPL-2.0
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
61 /// The following is an example of getting the PID of the current thread with zero additional cost
68 /// Getting the PID of the current process, also zero additional cost:
86 /// fn new() -> Self {
122 pub fn current_raw() -> *mut bindings::task_struct { in current_raw()
135 pub unsafe fn current() -> impl Deref<Target = Task> { in current()
144 fn deref(&self) -> &Self::Target { in current()
169 pub unsafe fn current_pid_ns() -> impl Deref<Target = PidNamespace> { in current_pid_ns()
178 fn deref(&self) -> &Self::Target { in current_pid_ns()
201 // (2) retrieving the `PidNamespace` of a non-`current` task in current_pid_ns()
210 // must've been acquired while holding the RCU lock. Note that accessing a non-`current` in current_pid_ns()
211 // task means `NULL` can be returned as the non-`current` task could have already passed in current_pid_ns()
231 // `task->thread_pid`. The `struct pid` stored in that field is used to retrieve the in current_pid_ns()
232 // `PidNamespace` of the caller. When `release_task()` is called `task->thread_pid` will be in current_pid_ns()
235 // from `task->thread_pid` to finish. in current_pid_ns()
252 pub fn as_ptr(&self) -> *mut bindings::task_struct { in as_ptr()
257 pub fn group_leader(&self) -> &Task { in group_leader()
269 pub fn pid(&self) -> Pid { in pid()
276 pub fn uid(&self) -> Kuid { in uid()
281 /// Returns the effective UID of the given task.
282 pub fn euid(&self) -> Kuid { in euid()
288 pub fn signal_pending(&self) -> bool { in signal_pending()
294 pub fn get_pid_ns(&self) -> Option<ARef<PidNamespace>> { in get_pid_ns()
309 pub fn tgid_nr_ns(&self, pidns: Option<&PidNamespace>) -> Pid { in tgid_nr_ns()
345 pub fn current_euid() -> Kuid { in current_euid()
352 pub fn from_raw(kuid: bindings::kuid_t) -> Self { in from_raw()
358 pub fn into_raw(self) -> bindings::kuid_t { in into_raw()
366 pub fn into_uid_in_current_ns(self) -> bindings::uid_t { in into_uid_in_current_ns()
374 fn eq(&self, other: &Kuid) -> bool { in eq()