|
|
@ -12,11 +12,17 @@ dnl warranty.
|
|
|
|
m4_define([_CHECK_ATOMIC_testbody], [[
|
|
|
|
m4_define([_CHECK_ATOMIC_testbody], [[
|
|
|
|
#include <atomic>
|
|
|
|
#include <atomic>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
#include <chrono>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int main() {
|
|
|
|
std::atomic<bool> lock{true};
|
|
|
|
std::atomic<bool> lock{true};
|
|
|
|
std::atomic_exchange(&lock, false);
|
|
|
|
std::atomic_exchange(&lock, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::atomic<std::chrono::seconds> t{0s};
|
|
|
|
|
|
|
|
t.store(2s);
|
|
|
|
|
|
|
|
|
|
|
|
std::atomic<int64_t> a{};
|
|
|
|
std::atomic<int64_t> a{};
|
|
|
|
|
|
|
|
|
|
|
|
int64_t v = 5;
|
|
|
|
int64_t v = 5;
|
|
|
|