![]() |
Contur 2
Educational OS kernel simulator
|
Configuration for host-thread dispatch runtime behavior. More...
#include <threading_config.h>
Public Member Functions | |
| constexpr bool | isValid () const noexcept |
| Returns true when this config satisfies minimum runtime requirements. | |
| constexpr bool | isSingleThreaded () const noexcept |
| Returns true when the runtime is configured for a single host thread. | |
| constexpr HostThreadingConfig | normalized () const noexcept |
| Returns a normalized copy with safe baseline invariants. | |
| constexpr void | normalize () noexcept |
| Normalizes this instance in place. | |
Public Attributes | |
| std::size_t | hostThreadCount = 1 |
| Number of host worker threads (must be >= 1). | |
| bool | deterministicMode = true |
| Enables deterministic scheduling checkpoints for multithreaded runs. | |
| bool | workStealingEnabled = false |
| Enables work stealing between worker lanes when multithreading is active. | |
Configuration for host-thread dispatch runtime behavior.
Definition at line 11 of file threading_config.h.
|
inlinenodiscardconstexprnoexcept |
Returns true when the runtime is configured for a single host thread.
Definition at line 29 of file threading_config.h.
References hostThreadCount.
Referenced by normalized().
|
inlinenodiscardconstexprnoexcept |
Returns true when this config satisfies minimum runtime requirements.
Definition at line 23 of file threading_config.h.
References hostThreadCount.
|
inlineconstexprnoexcept |
Normalizes this instance in place.
Definition at line 53 of file threading_config.h.
References normalized().
|
inlinenodiscardconstexprnoexcept |
Returns a normalized copy with safe baseline invariants.
Definition at line 35 of file threading_config.h.
References hostThreadCount, isSingleThreaded(), and workStealingEnabled.
Referenced by normalize().
| bool contur::HostThreadingConfig::deterministicMode = true |
Enables deterministic scheduling checkpoints for multithreaded runs.
Definition at line 17 of file threading_config.h.
| std::size_t contur::HostThreadingConfig::hostThreadCount = 1 |
Number of host worker threads (must be >= 1).
Definition at line 14 of file threading_config.h.
Referenced by isSingleThreaded(), isValid(), and normalized().
| bool contur::HostThreadingConfig::workStealingEnabled = false |
Enables work stealing between worker lanes when multithreading is active.
Definition at line 20 of file threading_config.h.
Referenced by normalized().