|
ThreadSchedule 4.1.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).
Definition at line 139 of file native.hpp.
|
inlineexplicitconstexpr |
Definition at line 142 of file native.hpp.
Referenced by highest(), lowest(), normal(), operator!=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), realtime_highest(), and realtime_lowest().
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 169 of file native.hpp.
References native_thread_priority().
Referenced by threadschedule::detail::native_schedule::low_latency(), and threadschedule::detail::resolve_scheduling_config().
|
inlinenodiscardconstexprnoexcept |
Definition at line 153 of file native.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 159 of file native.hpp.
References native_thread_priority().
Referenced by threadschedule::detail::native_schedule::background(), and threadschedule::detail::resolve_scheduling_config().
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 164 of file native.hpp.
References native_thread_priority().
Referenced by threadschedule::detail::apply_scheduling_config(), threadschedule::detail::scheduled_pool_backend_base< thread_pool_backend >::configure_scheduler_thread(), threadschedule::detail::lightweight_pool_backend_base< TaskSize >::configure_threads(), threadschedule::detail::scheduled_pool_backend_base< thread_pool_backend >::configure_threads(), threadschedule::detail::thread_pool_backend_base< indefinite_wait >::configure_threads(), threadschedule::detail::work_stealing_pool_backend::configure_threads(), threadschedule::detail::native_schedule::normal(), and threadschedule::detail::resolve_scheduling_config().
|
inlinenodiscardconstexprnoexcept |
Definition at line 190 of file native.hpp.
References native_thread_priority(), and threadschedule::detail::other.
|
inlinenodiscardconstexprnoexcept |
Definition at line 194 of file native.hpp.
References native_thread_priority(), and threadschedule::detail::other.
|
inlinenodiscardconstexprnoexcept |
Definition at line 199 of file native.hpp.
References native_thread_priority(), and threadschedule::detail::other.
|
inlinenodiscardconstexprnoexcept |
Definition at line 185 of file native.hpp.
References native_thread_priority(), and threadschedule::detail::other.
|
inlinenodiscardconstexprnoexcept |
Definition at line 205 of file native.hpp.
References native_thread_priority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 210 of file native.hpp.
References native_thread_priority(), and threadschedule::detail::other.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 179 of file native.hpp.
References native_thread_priority().
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 174 of file native.hpp.
References native_thread_priority().
|
inlinenodiscard |
Definition at line 216 of file native.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 148 of file native.hpp.