Assign a lower Locklevel for Mutexes used in QuasiAtomic operations.
This fixes the CompilerDriverTest on MIPS. The test was failing when
Transaction::Abort() acquired intern_table_lock_ and log_lock_
and subsequently performed QuasiAtomic operations.
Change-Id: I9fcda51221f1f298bcb5dd0e10019bd2034ab8ae
diff --git a/runtime/atomic.cc b/runtime/atomic.cc
index 63f2cf8..e766a8d 100644
--- a/runtime/atomic.cc
+++ b/runtime/atomic.cc
@@ -31,7 +31,7 @@
if (kNeedSwapMutexes) {
gSwapMutexes = new std::vector<Mutex*>;
for (size_t i = 0; i < kSwapMutexCount; ++i) {
- gSwapMutexes->push_back(new Mutex("QuasiAtomic stripe"));
+ gSwapMutexes->push_back(new Mutex("QuasiAtomic stripe", kSwapMutexesLock));
}
}
}
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index 1ba6180..81e62ab 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -55,6 +55,7 @@
enum LockLevel {
kLoggingLock = 0,
kMemMapsLock,
+ kSwapMutexesLock,
kUnexpectedSignalLock,
kThreadSuspendCountLock,
kAbortLock,