Author: ericwf Date: Thu May 4 02:45:09 2017 New Revision: 302129 URL: http://llvm.org/viewvc/llvm-project?rev=302129&view=rev Log: Fix incorrect usage of __libcpp_mutex_trylock. Patch from Andrey Khalyavin
Modified: libcxx/trunk/src/memory.cpp Modified: libcxx/trunk/src/memory.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/memory.cpp?rev=302129&r1=302128&r2=302129&view=diff ============================================================================== --- libcxx/trunk/src/memory.cpp (original) +++ libcxx/trunk/src/memory.cpp Thu May 4 02:45:09 2017 @@ -154,7 +154,7 @@ __sp_mut::lock() _NOEXCEPT { auto m = static_cast<__libcpp_mutex_t*>(__lx); unsigned count = 0; - while (__libcpp_mutex_trylock(m) != 0) + while (!__libcpp_mutex_trylock(m)) { if (++count > 16) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits