Lines Matching +full:reference +full:- +full:sync
1 // SPDX-License-Identifier: GPL-2.0
10 use crate::{bindings, sync::aref::AlwaysRefCounted, types::Opaque};
26 pub fn as_ptr(&self) -> *mut bindings::pid_namespace { in as_ptr()
30 /// Creates a reference to a [`PidNamespace`] from a valid pointer.
35 /// returned [`PidNamespace`] reference.
36 pub unsafe fn from_ptr<'a>(ptr: *const bindings::pid_namespace) -> &'a Self { in from_ptr()
43 // SAFETY: Instances of `PidNamespace` are always reference-counted.
47 // SAFETY: The existence of a shared reference means that the refcount is nonzero. in inc_ref()
53 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
59 // - `PidNamespace::dec_ref` can be called from any thread.
60 // - It is okay to send ownership of `PidNamespace` across thread boundaries.
65 unsafe impl Sync for PidNamespace {}