pub struct StatFlags(/* private fields */);Expand description
Kernel flags for a process
See also the Stat::flags() method.
Implementations§
Source§impl StatFlags
impl StatFlags
Sourcepub const PF_EXITING: StatFlags
pub const PF_EXITING: StatFlags
Getting shut down
Sourcepub const PF_EXITPIDONE: StatFlags
pub const PF_EXITPIDONE: StatFlags
PI exit done on shut down
Sourcepub const PF_WQ_WORKER: StatFlags
pub const PF_WQ_WORKER: StatFlags
I’m a workqueue worker
Sourcepub const PF_FORKNOEXEC: StatFlags
pub const PF_FORKNOEXEC: StatFlags
Forked but didn’t exec
Sourcepub const PF_MCE_PROCESS: StatFlags
pub const PF_MCE_PROCESS: StatFlags
Process policy on mce errors;
Sourcepub const PF_SUPERPRIV: StatFlags
pub const PF_SUPERPRIV: StatFlags
Used super-user privileges
Sourcepub const PF_DUMPCORE: StatFlags
pub const PF_DUMPCORE: StatFlags
Dumped core
Sourcepub const PF_SIGNALED: StatFlags
pub const PF_SIGNALED: StatFlags
Killed by a signal
Sourcepub const PF_MEMALLOC: StatFlags
pub const PF_MEMALLOC: StatFlags
Allocating memory
Sourcepub const PF_NPROC_EXCEEDED: StatFlags
pub const PF_NPROC_EXCEEDED: StatFlags
set_user() noticed that RLIMIT_NPROC was exceeded
Sourcepub const PF_USED_MATH: StatFlags
pub const PF_USED_MATH: StatFlags
If unset the fpu must be initialized before use
Sourcepub const PF_USED_ASYNC: StatFlags
pub const PF_USED_ASYNC: StatFlags
Used async_schedule*(), used by module init
Sourcepub const PF_NOFREEZE: StatFlags
pub const PF_NOFREEZE: StatFlags
This thread should not be frozen
Sourcepub const PF_MEMALLOC_NOFS: StatFlags
pub const PF_MEMALLOC_NOFS: StatFlags
All allocation requests will inherit GFP_NOFS
Sourcepub const PF_MEMALLOC_NOIO: StatFlags
pub const PF_MEMALLOC_NOIO: StatFlags
All allocation requests will inherit GFP_NOIO
Sourcepub const PF_LESS_THROTTLE: StatFlags
pub const PF_LESS_THROTTLE: StatFlags
Throttle me less: I clean memory
Sourcepub const PF_KTHREAD: StatFlags
pub const PF_KTHREAD: StatFlags
I am a kernel thread
Sourcepub const PF_RANDOMIZE: StatFlags
pub const PF_RANDOMIZE: StatFlags
Randomize virtual address space
Sourcepub const PF_SWAPWRITE: StatFlags
pub const PF_SWAPWRITE: StatFlags
Allowed to write to swap
Sourcepub const PF_MEMSTALL: StatFlags
pub const PF_MEMSTALL: StatFlags
Stalled due to lack of memory
Sourcepub const PF_NO_SETAFFINITY: StatFlags
pub const PF_NO_SETAFFINITY: StatFlags
Userland is not allowed to meddle with cpus_allowed
Sourcepub const PF_MCE_EARLY: StatFlags
pub const PF_MCE_EARLY: StatFlags
Early kill for mce process policy
Sourcepub const PF_MEMALLOC_NOCMA: StatFlags
pub const PF_MEMALLOC_NOCMA: StatFlags
All allocation request will have _GFP_MOVABLE cleared
Sourcepub const PF_MUTEX_TESTER: StatFlags
pub const PF_MUTEX_TESTER: StatFlags
Thread belongs to the rt mutex tester
Sourcepub const PF_FREEZER_SKIP: StatFlags
pub const PF_FREEZER_SKIP: StatFlags
Freezer should not count it as freezable
Sourcepub const PF_SUSPEND_TASK: StatFlags
pub const PF_SUSPEND_TASK: StatFlags
This thread called freeze_processes() and should not be frozen
Source§impl StatFlags
impl StatFlags
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<StatFlags>
pub const fn from_bits(bits: u32) -> Option<StatFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> StatFlags
pub const fn from_bits_truncate(bits: u32) -> StatFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> StatFlags
pub const fn from_bits_retain(bits: u32) -> StatFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<StatFlags>
pub fn from_name(name: &str) -> Option<StatFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: StatFlags) -> bool
pub const fn intersects(&self, other: StatFlags) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: StatFlags) -> bool
pub const fn contains(&self, other: StatFlags) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn remove(&mut self, other: StatFlags)
pub fn remove(&mut self, other: StatFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: StatFlags)
pub fn toggle(&mut self, other: StatFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: StatFlags, value: bool)
pub fn set(&mut self, other: StatFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: StatFlags) -> StatFlags
pub const fn intersection(self, other: StatFlags) -> StatFlags
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: StatFlags) -> StatFlags
pub const fn union(self, other: StatFlags) -> StatFlags
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: StatFlags) -> StatFlags
pub const fn difference(self, other: StatFlags) -> StatFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: StatFlags) -> StatFlags
pub const fn symmetric_difference(self, other: StatFlags) -> StatFlags
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> StatFlags
pub const fn complement(self) -> StatFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl StatFlags
impl StatFlags
Sourcepub const fn iter(&self) -> Iter<StatFlags>
pub const fn iter(&self) -> Iter<StatFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<StatFlags>
pub const fn iter_names(&self) -> IterNames<StatFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl BitAndAssign for StatFlags
impl BitAndAssign for StatFlags
Source§fn bitand_assign(&mut self, other: StatFlags)
fn bitand_assign(&mut self, other: StatFlags)
The bitwise and (&) of the bits in self and other.
Source§impl BitOrAssign for StatFlags
impl BitOrAssign for StatFlags
Source§fn bitor_assign(&mut self, other: StatFlags)
fn bitor_assign(&mut self, other: StatFlags)
The bitwise or (|) of the bits in self and other.
Source§impl BitXorAssign for StatFlags
impl BitXorAssign for StatFlags
Source§fn bitxor_assign(&mut self, other: StatFlags)
fn bitxor_assign(&mut self, other: StatFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl<'de> Deserialize<'de> for StatFlags
impl<'de> Deserialize<'de> for StatFlags
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StatFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StatFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Extend<StatFlags> for StatFlags
impl Extend<StatFlags> for StatFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = StatFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = StatFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for StatFlags
impl Flags for StatFlags
Source§fn from_bits_retain(bits: u32) -> StatFlags
fn from_bits_retain(bits: u32) -> StatFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<StatFlags> for StatFlags
impl FromIterator<StatFlags> for StatFlags
Source§impl IntoIterator for StatFlags
impl IntoIterator for StatFlags
Source§impl Ord for StatFlags
impl Ord for StatFlags
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for StatFlags
impl PartialOrd for StatFlags
Source§impl Serialize for StatFlags
impl Serialize for StatFlags
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sub for StatFlags
impl Sub for StatFlags
Source§impl SubAssign for StatFlags
impl SubAssign for StatFlags
Source§fn sub_assign(&mut self, other: StatFlags)
fn sub_assign(&mut self, other: StatFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.