aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/libcxx/thread/atomic.availability.verify.cpp')
-rw-r--r--libcxx/test/libcxx/thread/atomic.availability.verify.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp b/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
deleted file mode 100644
index 419be93..0000000
--- a/libcxx/test/libcxx/thread/atomic.availability.verify.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03, c++11
-// REQUIRES: availability-synchronization_library-missing
-
-// Test the availability markup on the C++20 Synchronization Library
-// additions to <atomic>.
-
-#include <atomic>
-
-void f() {
- {
- std::atomic<int> i(3);
- std::memory_order m = std::memory_order_relaxed;
-
- i.wait(4); // expected-error {{is unavailable}}
- i.wait(4, m); // expected-error {{is unavailable}}
- i.notify_one(); // expected-error {{is unavailable}}
- i.notify_all(); // expected-error {{is unavailable}}
-
- std::atomic_wait(&i, 4); // expected-error {{is unavailable}}
- std::atomic_wait_explicit(&i, 4, m); // expected-error {{is unavailable}}
- std::atomic_notify_one(&i); // expected-error {{is unavailable}}
- std::atomic_notify_all(&i); // expected-error {{is unavailable}}
- }
-
- {
- std::atomic<int> volatile i(3);
- std::memory_order m = std::memory_order_relaxed;
-
- i.wait(4); // expected-error {{is unavailable}}
- i.wait(4, m); // expected-error {{is unavailable}}
- i.notify_one(); // expected-error {{is unavailable}}
- i.notify_all(); // expected-error {{is unavailable}}
-
- std::atomic_wait(&i, 4); // expected-error {{is unavailable}}
- std::atomic_wait_explicit(&i, 4, m); // expected-error {{is unavailable}}
- std::atomic_notify_one(&i); // expected-error {{is unavailable}}
- std::atomic_notify_all(&i); // expected-error {{is unavailable}}
- }
-
- {
- std::atomic_flag flag;
- bool b = false;
- std::memory_order m = std::memory_order_relaxed;
- flag.wait(b); // expected-error {{is unavailable}}
- flag.wait(b, m); // expected-error {{is unavailable}}
- flag.notify_one(); // expected-error {{is unavailable}}
- flag.notify_all(); // expected-error {{is unavailable}}
-
- std::atomic_flag_wait(&flag, b); // expected-error {{is unavailable}}
- std::atomic_flag_wait_explicit(&flag, b, m); // expected-error {{is unavailable}}
- std::atomic_flag_notify_one(&flag); // expected-error {{is unavailable}}
- std::atomic_flag_notify_all(&flag); // expected-error {{is unavailable}}
- }
-
- {
- std::atomic_flag volatile flag;
- bool b = false;
- std::memory_order m = std::memory_order_relaxed;
- flag.wait(b); // expected-error {{is unavailable}}
- flag.wait(b, m); // expected-error {{is unavailable}}
- flag.notify_one(); // expected-error {{is unavailable}}
- flag.notify_all(); // expected-error {{is unavailable}}
-
- std::atomic_flag_wait(&flag, b); // expected-error {{is unavailable}}
- std::atomic_flag_wait_explicit(&flag, b, m); // expected-error {{is unavailable}}
- std::atomic_flag_notify_one(&flag); // expected-error {{is unavailable}}
- std::atomic_flag_notify_all(&flag); // expected-error {{is unavailable}}
- }
-}