|
contur2
|
Composite priority descriptor for a process. More...
#include <priority.h>
Public Member Functions | |
| constexpr | Priority () noexcept=default |
| Default-constructs a Normal-priority descriptor. | |
| constexpr | Priority (PriorityLevel level) noexcept |
| Constructs a priority with the given base level. Effective is initialized to match base; nice defaults to 0. | |
| constexpr | Priority (PriorityLevel base, PriorityLevel effective, std::int32_t nice) noexcept |
| Constructs a priority with base, effective, and nice values. | |
| constexpr bool | operator== (const Priority &other) const noexcept |
| Compares two Priority descriptors for equality. | |
| constexpr bool | operator!= (const Priority &other) const noexcept |
| Compares two Priority descriptors for inequality. | |
| constexpr bool | isHigherThan (const Priority &other) const noexcept |
| Returns true if this priority is higher (numerically lower) than other, based on effective level. Tie-broken by nice value (lower nice = higher prio). | |
Static Public Member Functions | |
| static constexpr std::int32_t | clampNice (std::int32_t value) noexcept |
| Clamps a nice value to the valid range [NICE_MIN, NICE_MAX]. | |
Public Attributes | |
| PriorityLevel | base = PriorityLevel::Normal |
| Static priority assigned at creation. | |
| PriorityLevel | effective = PriorityLevel::Normal |
| Dynamic priority used by scheduler. | |
| std::int32_t | nice = NICE_DEFAULT |
| Fine-grained adjustment (-20..+19). | |
Composite priority descriptor for a process.
Definition at line 45 of file priority.h.
|
constexprdefaultnoexcept |
Default-constructs a Normal-priority descriptor.
|
inlineexplicitconstexprnoexcept |
Constructs a priority with the given base level. Effective is initialized to match base; nice defaults to 0.
Definition at line 56 of file priority.h.
|
inlineconstexprnoexcept |
Constructs a priority with base, effective, and nice values.
Definition at line 63 of file priority.h.
|
inlinestaticnodiscardconstexprnoexcept |
Clamps a nice value to the valid range [NICE_MIN, NICE_MAX].
Definition at line 93 of file priority.h.
|
inlinenodiscardconstexprnoexcept |
Returns true if this priority is higher (numerically lower) than other, based on effective level. Tie-broken by nice value (lower nice = higher prio).
Definition at line 83 of file priority.h.
|
inlinenodiscardconstexprnoexcept |
Compares two Priority descriptors for inequality.
Definition at line 76 of file priority.h.
|
inlinenodiscardconstexprnoexcept |
Compares two Priority descriptors for equality.
Definition at line 70 of file priority.h.
| PriorityLevel contur::Priority::base = PriorityLevel::Normal |
Static priority assigned at creation.
Definition at line 47 of file priority.h.
| PriorityLevel contur::Priority::effective = PriorityLevel::Normal |
Dynamic priority used by scheduler.
Definition at line 48 of file priority.h.
| std::int32_t contur::Priority::nice = NICE_DEFAULT |
Fine-grained adjustment (-20..+19).
Definition at line 49 of file priority.h.