diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-04 07:45:09 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-04 07:45:09 +0000 |
commit | 61a241ef11f1123edd52cc9bddb2066f30e32a1e (patch) | |
tree | b581ddc01ccfb8a3798168c8cd5ab6ccc26c532a /libcxx/src/memory.cpp | |
parent | 60ef0e8a8abb0144036f83d1acf930e5bc31b9c9 (diff) | |
download | bcm5719-llvm-61a241ef11f1123edd52cc9bddb2066f30e32a1e.tar.gz bcm5719-llvm-61a241ef11f1123edd52cc9bddb2066f30e32a1e.zip |
Fix incorrect usage of __libcpp_mutex_trylock. Patch from Andrey Khalyavin
llvm-svn: 302129
Diffstat (limited to 'libcxx/src/memory.cpp')
-rw-r--r-- | libcxx/src/memory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp index 62e7e234020..4e0d3af9167 100644 --- a/libcxx/src/memory.cpp +++ b/libcxx/src/memory.cpp @@ -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) { |