Debian Codegraph @

libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/102994.cc

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