summaryrefslogtreecommitdiff
path: root/src/condition_variable.cpp
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 /src/condition_variable.cpp
parentb7332b04df5d50c92640c74cfeb138ecb7e3f7ae (diff)
Notes
Diffstat (limited to 'src/condition_variable.cpp')
-rw-r--r--src/condition_variable.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp
index 2200aefb804d..b8426c66fde6 100644
--- a/src/condition_variable.cpp
+++ b/src/condition_variable.cpp
@@ -1,9 +1,8 @@
//===-------------------- condition_variable.cpp --------------------------===//
//
-// 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
//
//===----------------------------------------------------------------------===//
@@ -16,12 +15,13 @@
#include "system_error"
#include "__undef_macros"
+#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#pragma comment(lib, "pthread")
+#endif
+
_LIBCPP_BEGIN_NAMESPACE_STD
-condition_variable::~condition_variable()
-{
- __libcpp_condvar_destroy(&__cv_);
-}
+// ~condition_variable is defined elsewhere.
void
condition_variable::notify_one() _NOEXCEPT
@@ -57,7 +57,7 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
nanoseconds d = tp.time_since_epoch();
if (d > nanoseconds(0x59682F000000E941))
d = nanoseconds(0x59682F000000E941);
- timespec ts;
+ __libcpp_timespec_t ts;
seconds s = duration_cast<seconds>(d);
typedef decltype(ts.tv_sec) ts_sec;
_LIBCPP_CONSTEXPR ts_sec ts_sec_max = numeric_limits<ts_sec>::max();