1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// { dg-options "-std=gnu++20" } // { dg-do compile { target c++20 } } // { dg-require-gthreads "" } #include <atomic> void test1(const std::atomic<char*>& a, char* p) { a.wait(p); } void test2(const std::atomic<int>* a, int v) { std::atomic_wait(a, v); std::atomic_notify_one(a); std::atomic_notify_all(a); }