[PATCH] D14862: [tsan] Fix deadlock_detector_stress_test.cc testcase for OS X
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 03:16:28 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253659: [tsan] Fix deadlock_detector_stress_test.cc testcase for OS X (authored by kuba.brecka).
Changed prior to commit:
http://reviews.llvm.org/D14862?vs=40749&id=40758#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14862
Files:
compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
Index: compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
===================================================================
--- compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
+++ compiler-rt/trunk/test/tsan/deadlock_detector_stress_test.cc
@@ -56,6 +56,7 @@
static bool supports_recursive_lock() { return true; }
};
+#ifndef __APPLE__
class PthreadSpinLock {
public:
PthreadSpinLock() { assert(0 == pthread_spin_init(&mu_, 0)); }
@@ -76,6 +77,9 @@
pthread_spinlock_t mu_;
char padding_[64 - sizeof(pthread_spinlock_t)];
};
+#else
+class PthreadSpinLock : public PthreadMutex { };
+#endif
class PthreadRWLock {
public:
@@ -95,7 +99,7 @@
private:
pthread_rwlock_t mu_;
- char padding_[64 - sizeof(pthread_rwlock_t)];
+ char padding_[256 - sizeof(pthread_rwlock_t)];
};
class LockTest {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14862.40758.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151120/a80199a2/attachment.bin>
More information about the llvm-commits
mailing list