Struct starnix_uapi::signals::SigSet
source · #[repr(transparent)]pub struct SigSet(pub c_ulong);
Expand description
POSIX defines sigset_t as either a numeric or structure type (so the number of signals can exceed the bits in a machine word). The programmer is supposed to modify this bitfield using sigaddset(), etc. rather than setting bits directly so client code can be agnostic to the definition.
- On x64, sigset_t is a typedef for “unsigned long”.
- On ARM64, sigset_t is a structure containing one “unsigned long” member.
To keep the Starnix code agnostic to the definition, this SigSet type provides a wrapper with a uniform interface for the things we need.
The layout of this object is designed to be identical to the layout of the current
architecture’s sigset_t type so UserRef
Tuple Fields§
§0: c_ulong
Implementations§
Trait Implementations§
source§impl FromBytes for SigSetwhere
c_ulong: FromBytes,
impl FromBytes for SigSetwhere
c_ulong: FromBytes,
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl IntoBytes for SigSetwhere
c_ulong: IntoBytes,
impl IntoBytes for SigSetwhere
c_ulong: IntoBytes,
source§impl PartialEq for SigSet
impl PartialEq for SigSet
impl Copy for SigSet
impl Eq for SigSet
impl StructuralPartialEq for SigSet
Auto Trait Implementations§
impl Freeze for SigSet
impl RefUnwindSafe for SigSet
impl Send for SigSet
impl Sync for SigSet
impl Unpin for SigSet
impl UnwindSafe for SigSet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more