summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/102994.cc
blob: 9d92ff954f1ff573a1b6260cbbde91f8620ae4ed (plain)
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);
}