|
RTOS Wrapper
API reference
|
Atomic two-state flag bitset with optional event-flag waiter. More...
#include <atomic>#include <climits>#include <cstddef>#include <cstdint>#include "OsAbstraction.h"#include "OsUtility.h"Go to the source code of this file.
Classes | |
| struct | hf::FlagsSnapshot< kWordCount > |
Snapshot of a FlagsSaver at a point in time. More... | |
| class | hf::FlagsReader< FlagId, kCount > |
Read-side ABC for FlagsSaver. More... | |
| class | hf::FlagsWriter< FlagId, kCount > |
Write-side ABC for FlagsSaver. More... | |
| class | hf::FlagsSaver< FlagId, kCount > |
| Concrete two-state flag bitset. More... | |
Namespaces | |
| namespace | hf |
Atomic two-state flag bitset with optional event-flag waiter.
Three types in one header:
hf::FlagsReader<FlagId, kCount> — pure-virtual read-side ABC.hf::FlagsWriter<FlagId, kCount> — pure-virtual write-side ABC.hf::FlagsSaver<FlagId, kCount> — concrete impl deriving from both.Pass an hf::FlagsReader* to consumers that may only inspect / wait, and an hf::FlagsWriter* to consumers that may only publish — keeps the apps↔middleware layering honest.
std::atomic<uint64_t> words (64 slots per word). Lookups and writes are lock-free. A change to any slot bumps a 32-bit sequence counter and signals a single bit on a lazily-created OsEventFlags.