[libcxx-commits] [libcxx] 477f6bc - [libc++] Make `stop_token` experimental

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 11 05:52:42 PDT 2023


Author: Hui
Date: 2023-07-11T08:52:31-04:00
New Revision: 477f6bc407db14f6856420c6eb275747f8670758

URL: https://github.com/llvm/llvm-project/commit/477f6bc407db14f6856420c6eb275747f8670758
DIFF: https://github.com/llvm/llvm-project/commit/477f6bc407db14f6856420c6eb275747f8670758.diff

LOG: [libc++] Make `stop_token` experimental

There are discussions about different ways of implementing `stop_token` to make it more performant
mark `stop_token` as experimental to allow us to change the design before it is shipped

Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>

Differential Revision: https://reviews.llvm.org/D154700

Added: 
    

Modified: 
    libcxx/include/__config
    libcxx/include/__stop_token/stop_callback.h
    libcxx/include/__stop_token/stop_source.h
    libcxx/include/__stop_token/stop_token.h
    libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp
    libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp
    libcxx/utils/libcxx/test/params.py

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 5b444c0ccb5751..37a5f6b8f00b4d 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -293,6 +293,10 @@
 #    define _LIBCPP_HAS_NO_INCOMPLETE_PSTL
 #  endif
 
+#  if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
+#    define _LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN
+#  endif
+
 // Need to detect which libc we're using if we're on Linux.
 #  if defined(__linux__)
 #    include <features.h>

diff  --git a/libcxx/include/__stop_token/stop_callback.h b/libcxx/include/__stop_token/stop_callback.h
index 2d94c10177448b..588bb4e239a4e6 100644
--- a/libcxx/include/__stop_token/stop_callback.h
+++ b/libcxx/include/__stop_token/stop_callback.h
@@ -28,7 +28,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER >= 20
+#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
 
 template <class _Callback>
 class _LIBCPP_AVAILABILITY_SYNC stop_callback : private __stop_callback_base {
@@ -96,4 +96,4 @@ _LIBCPP_AVAILABILITY_SYNC stop_callback(stop_token, Callback) -> stop_callback<C
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // _LIBCPP___STOP_TOKEN_STOP_TOKEN_H
+#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)

diff  --git a/libcxx/include/__stop_token/stop_source.h b/libcxx/include/__stop_token/stop_source.h
index 5dfc0f7afce7ec..9d7ffd3e91e283 100644
--- a/libcxx/include/__stop_token/stop_source.h
+++ b/libcxx/include/__stop_token/stop_source.h
@@ -23,7 +23,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER >= 20
+#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
 
 struct nostopstate_t {
   explicit nostopstate_t() = default;
@@ -89,4 +89,4 @@ class _LIBCPP_AVAILABILITY_SYNC stop_source {
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // _LIBCPP___STOP_TOKEN_STOP_SOURCE_H
+#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)

diff  --git a/libcxx/include/__stop_token/stop_token.h b/libcxx/include/__stop_token/stop_token.h
index 55ce5beed3aa6c..4ec72078226aa8 100644
--- a/libcxx/include/__stop_token/stop_token.h
+++ b/libcxx/include/__stop_token/stop_token.h
@@ -21,7 +21,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER >= 20
+#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
 
 class _LIBCPP_AVAILABILITY_SYNC stop_token {
 public:
@@ -57,7 +57,7 @@ class _LIBCPP_AVAILABILITY_SYNC stop_token {
   _LIBCPP_HIDE_FROM_ABI explicit stop_token(const __intrusive_shared_ptr<__stop_state>& __state) : __state_(__state) {}
 };
 
-#endif // _LIBCPP_STD_VER >= 20
+#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
index e257a66d88b334..c95f967b7998e9 100644
--- a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
+++ b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
@@ -26,3 +26,7 @@
 #ifdef _LIBCPP_HAS_NO_INCOMPLETE_PSTL
 #  error "-fexperimental-library should enable the PSTL"
 #endif
+
+#ifdef _LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN
+#  error "-fexperimental-library should enable the PSTL"
+#endif

diff  --git a/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
index 400fb356c63800..73693fc30b580c 100644
--- a/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
 // struct nostopstate_t {

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp
index 9fdfdb8337be60..3d1f61d0b43a39 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.const.token.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp
index 49c97dbc4507b8..f78643def5ce37 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/cons.rvalue.token.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp
index 2e66b64664055b..8f414ad000a6ad 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/copy.move.compile.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp
index 9c1d4fe3a8e2fc..bd4104ca4744df 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/ctad.compile.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
index debc29a55ee985..93137111b676cd 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp
index d60bad9b501dbb..b45dcc49dd568b 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/typedef.compile.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
 // using callback_type = _Callback;

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp
index 0684899b3bab12..628c5251bdc79a 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/assign.copy.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp
index b130e4135c2ba0..1347b1d3d06891 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.copy.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp
index 1dba0b645bdab6..1deafc433cb440 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.default.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp
index 3eb73ce2e92fd0..36477ba0693c62 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.move.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp
index 13067a562da02d..97f2dfb0abcd33 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/cons.nostopstate.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp
index 4aa3d530577b61..ec22bbc88c1f07 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/equals.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp
index 8cd500523f5e08..ccab810278dbde 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/get_token.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp
index 09b479611b7fe9..d49c0c48828de5 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/move.copy.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp
index 4616f1c56999cd..5c22511008bfd8 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/nodiscard.verify.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp
index 8f91bea2506a63..97431b771a3d99 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/request_stop.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp
index da4992ff0dee7b..3d7980b0fc7bd6 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_possible.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp
index a33a035aa12f85..f8ff441a75a2f8 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/stop_requested.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp
index 097dabf49f2149..48303207e3bff2 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.free.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp
index 7c724aced2cbc7..bab19147b86b40 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopsource/swap.member.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp
index 753cf51c5b5144..41bdd2c9059933 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.copy.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp
index 2a94bebb62aa8a..b9c3aa41d735ce 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/assign.move.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp
index 8794f704c87208..9507b43f8d7dc1 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.copy.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp
index 389725be9cdebd..4b069c2908cfa2 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.default.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp
index 11cedc0cf7cae3..621493187ad8c7 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/cons.move.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp
index 40099889814597..4de9b81f718685 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/equals.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp
index b62ecdc8551d01..89ab39d11edc83 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/nodiscard.verify.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp
index daa7f9dee47080..fd73f5e5166782 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_possible.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp
index acf986e978b613..4dbc3137ef2098 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/stop_requested.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp
index 90e95b11277ccc..e910c7bd9d2ab0 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.free.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp
index 9819c7db2e7be9..af8cb2d9bc020c 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stoptoken/swap.member.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
+// UNSUPPORTED: libcpp-has-no-experimental-stop_token
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // XFAIL: availability-synchronization_library-missing
 

diff  --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 851d9a828a33f8..68cf1016efacbc 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -272,6 +272,7 @@ def getModuleFlag(cfg, enable_modules):
         if experimental
         else [
             AddFeature("libcpp-has-no-incomplete-pstl"),
+            AddFeature("libcpp-has-no-experimental-stop_token"),
         ],
     ),
     Parameter(


        


More information about the libcxx-commits mailing list