78 return !(*
this == other);
87 return static_cast<std::int8_t
>(
effective) <
static_cast<std::int8_t
>(other.effective);
89 return nice < other.nice;
93 [[nodiscard]]
static constexpr std::int32_t
clampNice(std::int32_t value)
noexcept
117 return "AboveNormal";
121 return "BelowNormal";
PriorityLevel
Discrete priority levels, from highest (Realtime) to lowest (Idle).
@ High
Above-normal urgency.
@ AboveNormal
Slightly above default.
@ Normal
Default priority for user processes.
@ Realtime
Highest — time-critical, preempts everything.
@ BelowNormal
Slightly below default.
@ Idle
Lowest — runs only when nothing else is ready.
constexpr std::int32_t NICE_MAX
Maximum nice value (lowest boost).
constexpr std::string_view priorityLevelName(PriorityLevel level) noexcept
Returns a human-readable name for the given priority level.
constexpr std::int32_t NICE_MIN
Minimum nice value (highest boost).
constexpr std::int32_t NICE_DEFAULT
Default nice value (no adjustment).
constexpr Priority() noexcept=default
Default-constructs a Normal-priority descriptor.
constexpr bool isHigherThan(const Priority &other) const noexcept
Returns true if this priority is higher (numerically lower) than other, based on effective level....
constexpr bool operator==(const Priority &other) const noexcept
Compares two Priority descriptors for equality.
std::int32_t nice
Fine-grained adjustment (-20..+19).
PriorityLevel base
Static priority assigned at creation.
constexpr bool operator!=(const Priority &other) const noexcept
Compares two Priority descriptors for inequality.
constexpr Priority(PriorityLevel base, PriorityLevel effective, std::int32_t nice) noexcept
Constructs a priority with base, effective, and nice values.
static constexpr std::int32_t clampNice(std::int32_t value) noexcept
Clamps a nice value to the valid range [NICE_MIN, NICE_MAX].
PriorityLevel effective
Dynamic priority used by scheduler.