diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-04-05 01:46:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 01:46:13 -0400 |
| commit | 0cd31fc7ff157551cfbba5da35cd79f118d2a2e3 (patch) | |
| tree | a308488f5d85184c8ec402fb3f55f1cf2704443e /lib/libcxx/include/__thread/this_thread.h | |
| parent | 8acedfd5baabab705946ad097746f9183ef62420 (diff) | |
| parent | cefe65c1b8abe65a22d4b68410db1be264fdeda0 (diff) | |
| download | zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.tar.gz zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.zip | |
Merge pull request #22780 from ziglang/llvm20
LLVM 20
Diffstat (limited to 'lib/libcxx/include/__thread/this_thread.h')
| -rw-r--r-- | lib/libcxx/include/__thread/this_thread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libcxx/include/__thread/this_thread.h b/lib/libcxx/include/__thread/this_thread.h index de7eea282c..4df137711a 100644 --- a/lib/libcxx/include/__thread/this_thread.h +++ b/lib/libcxx/include/__thread/this_thread.h @@ -10,6 +10,7 @@ #ifndef _LIBCPP___THREAD_THIS_THREAD_H #define _LIBCPP___THREAD_THIS_THREAD_H +#include <__chrono/duration.h> #include <__chrono/steady_clock.h> #include <__chrono/time_point.h> #include <__condition_variable/condition_variable.h> @@ -29,6 +30,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD namespace this_thread { +#if _LIBCPP_HAS_THREADS + _LIBCPP_EXPORTED_FROM_ABI void sleep_for(const chrono::nanoseconds& __ns); template <class _Rep, class _Period> @@ -65,6 +68,8 @@ inline _LIBCPP_HIDE_FROM_ABI void sleep_until(const chrono::time_point<chrono::s inline _LIBCPP_HIDE_FROM_ABI void yield() _NOEXCEPT { __libcpp_thread_yield(); } +#endif // _LIBCPP_HAS_THREADS + } // namespace this_thread _LIBCPP_END_NAMESPACE_STD |
