roo_threads
API Documentation for roo_threads
Loading...
Searching...
No Matches
atomic.h
Go to the documentation of this file.
1#pragma once
2
4
5#if (defined ROO_THREADS_ATOMIC_USE_CPPSTD)
6
8
9namespace roo {
10
11/// @brief Memory ordering constraints for atomic operations.
12using memory_order = roo_threads::cppstd::memory_order;
13
14/// @brief Atomic variable type.
15/// @tparam T value type stored atomically.
16template <typename T>
17using atomic = roo_threads::cppstd::atomic<T>;
18
19} // namespace roo
20
21#elif (defined ROO_THREADS_SINGLETHREADED)
22
24
25namespace roo {
26
27/// @brief Memory ordering constraints for atomic operations.
28using memory_order = roo_threads::singlethreaded::memory_order;
29
30/// @brief Atomic variable type.
31/// @tparam T value type stored atomically.
32template <typename T>
33using atomic = roo_threads::singlethreaded::atomic;
34
35} // namespace roo
36
37#endif
Definition latch.h:6