Lines Matching defs:CpumaskVar
170 /// A [`CpumaskVar`] instance always corresponds to a valid C `struct cpumask_var_t`.
173 /// for the lifetime of [`CpumaskVar`].
177 /// The following example demonstrates how to create and update a [`CpumaskVar`].
181 /// use kernel::cpumask::CpumaskVar;
183 /// let mut mask = CpumaskVar::new_zero(GFP_KERNEL).unwrap();
204 /// let mask2 = CpumaskVar::try_clone(&mask).unwrap();
216 pub struct CpumaskVar {
223 impl CpumaskVar {
224 /// Creates a zero-initialized instance of the [`CpumaskVar`].
233 // INVARIANT: The associated memory is freed when the `CpumaskVar` goes out of
244 /// Creates an instance of the [`CpumaskVar`].
248 /// The caller must ensure that the returned [`CpumaskVar`] is properly initialized before
258 // INVARIANT: The associated memory is freed when the `CpumaskVar` goes out of
306 // Make [`CpumaskVar`] behave like a pointer to [`Cpumask`].
307 impl Deref for CpumaskVar {
312 // SAFETY: The caller owns CpumaskVar, so it is safe to deref the cpumask.
322 impl DerefMut for CpumaskVar {
325 // SAFETY: The caller owns CpumaskVar, so it is safe to deref the cpumask.
335 impl Drop for CpumaskVar {