xref: /freebsd/contrib/llvm-project/libcxx/modules/std/thread.inc (revision 5b56413d04e608379c9a306373554a8e4d321bc0)
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//===----------------------------------------------------------------------===//
9
10export namespace std {
11#ifndef _LIBCPP_HAS_NO_THREADS
12  // [thread.thread.class], class thread
13  using std::thread;
14
15  using std::swap;
16
17  // [thread.jthread.class], class jthread
18#  if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
19  using std::jthread;
20#  endif
21
22  // [thread.thread.this], namespace this_thread
23  namespace this_thread {
24    using std::this_thread::get_id;
25
26    using std::this_thread::sleep_for;
27    using std::this_thread::sleep_until;
28    using std::this_thread::yield;
29  } // namespace this_thread
30
31  // [thread.thread.id]
32  using std::operator==;
33  using std::operator<=>;
34#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
35  using std::operator<<;
36#  endif // _LIBCPP_HAS_NO_LOCALIZATION
37
38#  if _LIBCPP_STD_VER >= 23
39  using std::formatter;
40#  endif
41
42  using std::hash;
43#endif // _LIBCPP_HAS_NO_THREADS
44} // namespace std
45