Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / include / stop_token
blob58e3649c07056b625c061169276a52bd8915de0d
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_STOP_TOKEN
11 #define _LIBCPP_STOP_TOKEN
15 namespace std {
16   // [stoptoken], class stop_token
17   class stop_token;
19   // [stopsource], class stop_source
20   class stop_source;
22   // no-shared-stop-state indicator
23   struct nostopstate_t {
24     explicit nostopstate_t() = default;
25   };
26   inline constexpr nostopstate_t nostopstate{};
28   // [stopcallback], class template stop_callback
29   template<class Callback>
30     class stop_callback;
34 #include <__config>
36 #if _LIBCPP_HAS_THREADS
38 #  if _LIBCPP_STD_VER >= 20
39 #    include <__stop_token/stop_callback.h>
40 #    include <__stop_token/stop_source.h>
41 #    include <__stop_token/stop_token.h>
42 #  endif
44 #  include <version>
46 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
47 #    pragma GCC system_header
48 #  endif
50 #endif // _LIBCPP_HAS_THREADS
52 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
53 #  include <cstddef>
54 #  include <iosfwd>
55 #endif
57 #endif // _LIBCPP_STOP_TOKEN