|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Value-semantic wrapper for a thread scheduling priority. More...
#include <native.hpp>
Public Member Functions | |
| constexpr | native_thread_priority (int priority=0) |
| constexpr auto | value () const noexcept -> int |
| constexpr auto | is_valid () const noexcept -> bool |
| constexpr auto | operator== (native_thread_priority const &other) const noexcept -> bool |
| constexpr auto | operator!= (native_thread_priority const &other) const noexcept -> bool |
| constexpr auto | operator< (native_thread_priority const &other) const noexcept -> bool |
| constexpr auto | operator<= (native_thread_priority const &other) const noexcept -> bool |
| constexpr auto | operator> (native_thread_priority const &other) const noexcept -> bool |
| constexpr auto | operator>= (native_thread_priority const &other) const noexcept -> bool |
| auto | to_string () const -> std::string |
Static Public Member Functions | |
| static constexpr auto | lowest () noexcept -> native_thread_priority |
| static constexpr auto | normal () noexcept -> native_thread_priority |
| static constexpr auto | highest () noexcept -> native_thread_priority |
| static constexpr auto | realtime_lowest () noexcept -> native_thread_priority |
| static constexpr auto | realtime_highest () noexcept -> native_thread_priority |
Value-semantic wrapper for a thread scheduling priority.
Encapsulates a single integer priority in the range [-20, 99]. The value is silently clamped to this range on construction (via std::clamp), so out-of-range inputs never produce an invalid object.
For regular scheduling, lower numeric values denote higher scheduling priority (following the Unix nice convention): -20 is the most favourable and 19 is the least. For POSIX real-time policies (FIFO / RR), positive values are treated as native real-time priorities where larger values mean higher priority (typically 1..99 on Linux).
THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_LOWEST) when applied.constexpr-constructible - can be used in compile-time contexts.==, !=, <, <=, >, >=) are provided and compare the underlying integer value.Definition at line 139 of file native.hpp.
|
inlineexplicitconstexpr |
Definition at line 142 of file native.hpp.
|
inlinestaticconstexprnoexcept |
Definition at line 169 of file native.hpp.
Referenced by threadschedule::detail::native_schedule::low_latency(), and threadschedule::detail::resolve_scheduling_config().
|
inlineconstexprnoexcept |
Definition at line 153 of file native.hpp.
|
inlinestaticconstexprnoexcept |
Definition at line 159 of file native.hpp.
Referenced by threadschedule::detail::native_schedule::background(), and threadschedule::detail::resolve_scheduling_config().
|
inlinestaticconstexprnoexcept |
Definition at line 164 of file native.hpp.
Referenced by threadschedule::detail::apply_scheduling_config(), threadschedule::detail::native_schedule::normal(), and threadschedule::detail::resolve_scheduling_config().
|
inlineconstexprnoexcept |
Definition at line 190 of file native.hpp.
References threadschedule::detail::other.
|
inlineconstexprnoexcept |
Definition at line 194 of file native.hpp.
References threadschedule::detail::other.
|
inlineconstexprnoexcept |
Definition at line 199 of file native.hpp.
References threadschedule::detail::other.
|
inlineconstexprnoexcept |
Definition at line 185 of file native.hpp.
References threadschedule::detail::other.
|
inlineconstexprnoexcept |
Definition at line 205 of file native.hpp.
References threadschedule::detail::other.
|
inlineconstexprnoexcept |
Definition at line 210 of file native.hpp.
References threadschedule::detail::other.
|
inlinestaticconstexprnoexcept |
Definition at line 179 of file native.hpp.
|
inlinestaticconstexprnoexcept |
Definition at line 174 of file native.hpp.
|
inline |
Definition at line 216 of file native.hpp.
|
inlineconstexprnoexcept |
Definition at line 148 of file native.hpp.