Skip to content

Commit

Permalink
[feat] add constructor full() to support constructing a cpumask with …
Browse files Browse the repository at this point in the history
…every bit set to true
  • Loading branch information
hky1999 committed Sep 23, 2024
1 parent e5e7c0f commit b4eab5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ where
Self::default()
}

/// Construct a cpumask with every bit set to `true`.
#[inline]
pub fn full() -> Self {
Self {
value: Bitmap::mask(SIZE),
}
}

/// Construct a cpumask where every bit with index less than `bits` is
/// `true`, and every other bit is `false`.
#[inline]
Expand Down

0 comments on commit b4eab5e

Please sign in to comment.