Speeduino
Loading...
Searching...
No Matches
atomic.h
Go to the documentation of this file.
1#pragma once
2
4#include <tuple>
5#include "board_definition.h"
6
7#if !defined(ATOMIC)
8
9#include <SimplyAtomic.h>
10
11#endif
12
23template <typename... Args>
24static inline auto atomic_copy(Args&&... args)
25{
26 ATOMIC()
27 {
28 // At this point we make copies of all the arguments.
29 // Since the arguments are references, we are not making copies of copies
30 return std::make_tuple(std::forward<Args>(args)...);
31 }
32 // LCOV_EXCL_START
33 __builtin_unreachable();
34 // LCOV_EXCL_STOP
35}
36
static auto atomic_copy(Args &&... args)
Atomically copy the forwarding reference arguments into a std::tuple<>
Definition atomic.h:24
Inclusion of board specific header files and board related definitions.
Workaround when min() & max() are defined as macros, which generates compile errors in most C++ stand...