[libcxx-commits] [libcxx] 48fcce1 - [SystemZ][ZOS] Fix __libcpp_thrad_isnull()

Zbigniew Sarbinowski via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 12 12:21:22 PST 2021


Author: Zbigniew Sarbinowski
Date: 2021-02-12T20:21:11Z
New Revision: 48fcce1aea9e783c3fe64482f06a965707e75990

URL: https://github.com/llvm/llvm-project/commit/48fcce1aea9e783c3fe64482f06a965707e75990
DIFF: https://github.com/llvm/llvm-project/commit/48fcce1aea9e783c3fe64482f06a965707e75990.diff

LOG: [SystemZ][ZOS] Fix __libcpp_thrad_isnull()

Previous pthread revision https://reviews.llvm.org/D91875 missed a small change for `__libcpp_thrad_isnull()` required for z/OS.

Reviewed By: zibi

Differential Revision: https://reviews.llvm.org/D96302

Added: 
    

Modified: 
    libcxx/include/__threading_support

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index 45e3016b2850..46438b72f9fc 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -500,7 +500,7 @@ bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
 
 // Thread
 bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
-  return *__t == __libcpp_thread_t();
+  return __libcpp_thread_get_id(__t) == 0;
 }
 
 int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),


        


More information about the libcxx-commits mailing list