summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread/thread.mutex
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor flaky shared_mutex testsEric Fiselier2015-08-264-22/+39
| | | | llvm-svn: 246055
* Refactor and fix more flaky shared_mutex testsEric Fiselier2015-08-256-37/+123
| | | | llvm-svn: 245918
* Refactor shared_timed_mutex tests.Eric Fiselier2015-08-2221-146/+119
| | | | | | | First I removed all of the uses of _LIBCPP_STD_VER and added LIT UNSUPPORTED tags to prevent the tests from being run in older standard dialects. Second I increased the time tolerances used in some tests when testing with Thread Sanitizer because thread sanitizer make these tests take longer. llvm-svn: 245793
* Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480Marshall Clow2015-06-308-0/+327
| | | | llvm-svn: 241067
* LWG2442: call_once() shouldn't DECAY_COPY(). Patch from K-Ballo.Eric Fiselier2015-06-131-1/+47
| | | | | | | This patch fixes LWG issue 2422 by removing the DECAY_COPY from call once. The review can be found here: http://reviews.llvm.org/D10191 llvm-svn: 239654
* Change #ifdefs in test to UNSUPPORTED. No functionality change in the testsMarshall Clow2015-06-119-48/+10
| | | | llvm-svn: 239562
* [libcxx] Fix bug in shared_timed_mutex that could cause a program to hang.Eric Fiselier2015-04-021-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The summary of the bug, provided by Stephan T. Lavavej: In shared_timed_mutex::try_lock_until() (line 195 in 3.6.0), you need to deliver a notification. The scenario is: * There are N threads holding the shared lock. * One thread calls try_lock_until() to attempt to acquire the exclusive lock. It sets the "I want to write" bool/bit, then waits for the N readers to drain away. * K more threads attempt to acquire the shared lock, but they notice that someone said "I want to write", so they block on a condition_variable. * At least one of the N readers is stubborn and doesn't release the shared lock. * The wannabe-writer times out, gives up, and unsets the "I want to write" bool/bit. At this point, a notification (it needs to be notify_all) must be delivered to the condition_variable that the K wannabe-readers are waiting on. Otherwise, they can block forever without waking up. Reviewers: mclow.lists, jyasskin Reviewed By: jyasskin Subscribers: jyasskin, cfe-commits Differential Revision: http://reviews.llvm.org/D8796 llvm-svn: 233944
* Fix PR23041. Use lock_shared() as opposed to lock() in shared_lock test.Eric Fiselier2015-03-271-1/+1
| | | | llvm-svn: 233367
* Move test into test/std subdirectory.Eric Fiselier2014-12-20103-0/+5528
llvm-svn: 224658
OpenPOWER on IntegriCloud