[libcxx] Follow-up to r292107

I've missed a couple of updates. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Asiri Rathnayake
2017-01-16 13:13:01 +00:00
parent 49a9e0c64c
commit 24872f4e35

View File

@@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
thread::~thread() thread::~thread()
{ {
if (__t_ != 0) if (!__libcpp_thread_isnull(&__t_))
terminate(); terminate();
} }
@@ -48,11 +48,11 @@ void
thread::join() thread::join()
{ {
int ec = EINVAL; int ec = EINVAL;
if (__t_ != 0) if (!__libcpp_thread_isnull(&__t_))
{ {
ec = __libcpp_thread_join(&__t_); ec = __libcpp_thread_join(&__t_);
if (ec == 0) if (ec == 0)
__t_ = 0; __t_ = _LIBCPP_NULL_THREAD;
} }
if (ec) if (ec)
@@ -63,11 +63,11 @@ void
thread::detach() thread::detach()
{ {
int ec = EINVAL; int ec = EINVAL;
if (__t_ != 0) if (!__libcpp_thread_isnull(&__t_))
{ {
ec = __libcpp_thread_detach(&__t_); ec = __libcpp_thread_detach(&__t_);
if (ec == 0) if (ec == 0)
__t_ = 0; __t_ = _LIBCPP_NULL_THREAD;
} }
if (ec) if (ec)