Enhanced atomic flag with additional operations.
More...
#include <sync_primitives.h>
Enhanced atomic flag with additional operations.
Definition at line 170 of file sync_primitives.h.
◆ atomic_flag_wrapper() [1/6]
| kcenon::thread::sync::atomic_flag_wrapper::atomic_flag_wrapper |
( |
| ) |
|
|
inlinenoexcept |
◆ ~atomic_flag_wrapper() [1/2]
| kcenon::thread::sync::atomic_flag_wrapper::~atomic_flag_wrapper |
( |
| ) |
|
|
default |
◆ atomic_flag_wrapper() [2/6]
◆ atomic_flag_wrapper() [3/6]
◆ atomic_flag_wrapper() [4/6]
| kcenon::thread::sync::atomic_flag_wrapper::atomic_flag_wrapper |
( |
| ) |
|
|
inlinenoexcept |
◆ ~atomic_flag_wrapper() [2/2]
| kcenon::thread::sync::atomic_flag_wrapper::~atomic_flag_wrapper |
( |
| ) |
|
|
default |
◆ atomic_flag_wrapper() [5/6]
◆ atomic_flag_wrapper() [6/6]
◆ clear() [1/2]
| void kcenon::thread::sync::atomic_flag_wrapper::clear |
( |
std::memory_order | order = std::memory_order_release | ) |
|
|
inlinenoexcept |
Clear the flag atomically.
- Parameters
-
| order | Memory ordering constraint |
Definition at line 188 of file sync_primitives.h.
References flag_.
◆ clear() [2/2]
| void kcenon::thread::sync::atomic_flag_wrapper::clear |
( |
std::memory_order | order = std::memory_order_release | ) |
|
|
inlinenoexcept |
Clear the flag atomically.
- Parameters
-
| order | Memory ordering constraint |
Definition at line 194 of file sync_primitives.h.
References flag_.
◆ notify_all() [1/2]
| void kcenon::thread::sync::atomic_flag_wrapper::notify_all |
( |
| ) |
|
|
inlinenoexcept |
◆ notify_all() [2/2]
| void kcenon::thread::sync::atomic_flag_wrapper::notify_all |
( |
| ) |
|
|
inlinenoexcept |
◆ notify_one() [1/2]
| void kcenon::thread::sync::atomic_flag_wrapper::notify_one |
( |
| ) |
|
|
inlinenoexcept |
◆ notify_one() [2/2]
| void kcenon::thread::sync::atomic_flag_wrapper::notify_one |
( |
| ) |
|
|
inlinenoexcept |
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
◆ operator=() [4/4]
◆ test() [1/2]
| bool kcenon::thread::sync::atomic_flag_wrapper::test |
( |
std::memory_order | order = std::memory_order_acquire | ) |
const |
|
inlinenoexcept |
Test the flag without modifying it.
- Parameters
-
| order | Memory ordering constraint |
- Returns
- Current value of the flag
Definition at line 197 of file sync_primitives.h.
197 {
198 return flag_.test(order);
199 }
References flag_.
◆ test() [2/2]
| bool kcenon::thread::sync::atomic_flag_wrapper::test |
( |
std::memory_order | order = std::memory_order_acquire | ) |
const |
|
inlinenoexcept |
Test the flag without modifying it.
- Parameters
-
| order | Memory ordering constraint |
- Returns
- Current value of the flag
Definition at line 203 of file sync_primitives.h.
203 {
204 return flag_.test(order);
205 }
References flag_.
◆ test_and_set() [1/2]
| bool kcenon::thread::sync::atomic_flag_wrapper::test_and_set |
( |
std::memory_order | order = std::memory_order_acq_rel | ) |
|
|
inlinenoexcept |
Test and set the flag atomically.
- Parameters
-
| order | Memory ordering constraint |
- Returns
- Previous value of the flag
Definition at line 180 of file sync_primitives.h.
180 {
181 return flag_.test_and_set(order);
182 }
References flag_.
◆ test_and_set() [2/2]
| bool kcenon::thread::sync::atomic_flag_wrapper::test_and_set |
( |
std::memory_order | order = std::memory_order_acq_rel | ) |
|
|
inlinenoexcept |
Test and set the flag atomically.
- Parameters
-
| order | Memory ordering constraint |
- Returns
- Previous value of the flag
Definition at line 186 of file sync_primitives.h.
186 {
187 return flag_.test_and_set(order);
188 }
References flag_.
◆ wait() [1/2]
| void kcenon::thread::sync::atomic_flag_wrapper::wait |
( |
bool | expected, |
|
|
std::memory_order | order = std::memory_order_acquire ) const |
|
inlinenoexcept |
Wait until the flag becomes false.
- Parameters
-
| order | Memory ordering constraint |
Definition at line 205 of file sync_primitives.h.
205 {
206 flag_.wait(expected, order);
207 }
References flag_.
◆ wait() [2/2]
| void kcenon::thread::sync::atomic_flag_wrapper::wait |
( |
bool | expected, |
|
|
std::memory_order | order = std::memory_order_acquire ) const |
|
inlinenoexcept |
Wait until the flag becomes false.
- Parameters
-
| order | Memory ordering constraint |
Definition at line 211 of file sync_primitives.h.
211 {
212 flag_.wait(expected, order);
213 }
References flag_.
◆ flag_
| std::atomic_flag kcenon::thread::sync::atomic_flag_wrapper::flag_ |
|
private |
The documentation for this class was generated from the following files: