aboutsummaryrefslogtreecommitdiffstats
path: root/include/thread
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:16 +0000
commit1147845301c03308e3419b89c28c77bb6917fe04 (patch)
tree225f45e462607f9595a5e5f418a9533ab50e83bb /include/thread
parentb7332b04df5d50c92640c74cfeb138ecb7e3f7ae (diff)
downloadsrc-1147845301c03308e3419b89c28c77bb6917fe04.tar.gz
src-1147845301c03308e3419b89c28c77bb6917fe04.zip
Vendor import of stripped libc++ trunk r366426 (just before the release_90 branchvendor/libc++/libc++-trunk-r366426
Notes
Notes: svn path=/vendor/libc++/dist/; revision=351284 svn path=/vendor/libc++/libc++-trunk-r366426/; revision=351285; tag=vendor/libc++/libc++-trunk-r366426
Diffstat (limited to 'include/thread')
-rw-r--r--include/thread12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/thread b/include/thread
index 8c0115f8708d..3d8d2ac9ce50 100644
--- a/include/thread
+++ b/include/thread
@@ -1,10 +1,9 @@
// -*- C++ -*-
//===--------------------------- thread -----------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// 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
//
//===----------------------------------------------------------------------===//
@@ -435,7 +434,12 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d)
using namespace chrono;
if (__d > duration<_Rep, _Period>::zero())
{
+#if defined(_LIBCPP_COMPILER_GCC) && (__powerpc__ || __POWERPC__)
+ // GCC's long double const folding is incomplete for IBM128 long doubles.
_LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
+#else
+ _LIBCPP_CONSTEXPR duration<long double> _Max = duration<long double>(ULLONG_MAX/1000000000ULL) ;
+#endif
nanoseconds __ns;
if (__d < _Max)
{