Fix incorrect usage of __libcpp_mutex_trylock. Patch from Andrey Khalyavin
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -154,7 +154,7 @@ __sp_mut::lock() _NOEXCEPT
|
|||||||
{
|
{
|
||||||
auto m = static_cast<__libcpp_mutex_t*>(__lx);
|
auto m = static_cast<__libcpp_mutex_t*>(__lx);
|
||||||
unsigned count = 0;
|
unsigned count = 0;
|
||||||
while (__libcpp_mutex_trylock(m) != 0)
|
while (!__libcpp_mutex_trylock(m))
|
||||||
{
|
{
|
||||||
if (++count > 16)
|
if (++count > 16)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user