[libcxx] r292109 - [libcxx] Follow-up to r292107

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 05:13:02 PST 2017


Author: asiri
Date: Mon Jan 16 07:13:01 2017
New Revision: 292109

URL: http://llvm.org/viewvc/llvm-project?rev=292109&view=rev
Log:
[libcxx] Follow-up to r292107

I've missed a couple of updates. NFC.

Modified:
    libcxx/trunk/src/thread.cpp

Modified: libcxx/trunk/src/thread.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/thread.cpp?rev=292109&r1=292108&r2=292109&view=diff
==============================================================================
--- libcxx/trunk/src/thread.cpp (original)
+++ libcxx/trunk/src/thread.cpp Mon Jan 16 07:13:01 2017
@@ -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)




More information about the cfe-commits mailing list