cxx/test/thread/thread.mutex/thread.lock/thread.lock.unique
David Chisnall 76aa2ef017 Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
This change removes the spurious m.unlock() call.  

If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 11:28:45 +00:00
..
thread.lock.unique.cons Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex. 2013-02-19 11:28:45 +00:00
thread.lock.unique.locking Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often. 2013-02-06 20:25:56 +00:00
thread.lock.unique.mod license change 2010-11-16 22:09:02 +00:00
thread.lock.unique.obs update test for explicit bool operator. 2012-02-25 21:43:14 +00:00
types.pass.cpp license change 2010-11-16 22:09:02 +00:00