summaryrefslogtreecommitdiffstats
path: root/libcxx/src/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/thread.cpp')
-rw-r--r--libcxx/src/thread.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp
index 5ccf829fb864..c471b5c022ec 100644
--- a/libcxx/src/thread.cpp
+++ b/libcxx/src/thread.cpp
@@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
thread::~thread()
{
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
terminate();
}
@@ -48,11 +48,11 @@ void
thread::join()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_join(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)
@@ -63,11 +63,11 @@ void
thread::detach()
{
int ec = EINVAL;
- if (__t_ != 0)
+ if (!__libcpp_thread_isnull(&__t_))
{
ec = __libcpp_thread_detach(&__t_);
if (ec == 0)
- __t_ = 0;
+ __t_ = _LIBCPP_NULL_THREAD;
}
if (ec)