summaryrefslogtreecommitdiffstats
path: root/runtime/monitor.cc
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2014-05-21 17:46:23 -0700
committerHans Boehm <hboehm@google.com>2014-06-06 16:13:42 -0700
commit3035961cb41865b80b927546be0c708b6389cec6 (patch)
tree27ed39f92c013381d08c7ad51d311cb29be230dc /runtime/monitor.cc
parente21bf0099117b82963cdf7f95a1b8dabfcf29397 (diff)
downloadart-3035961cb41865b80b927546be0c708b6389cec6.tar.gz
art-3035961cb41865b80b927546be0c708b6389cec6.tar.bz2
art-3035961cb41865b80b927546be0c708b6389cec6.zip
Clean up and augment Atomic class. Replace QuasiAtomic MemBars.
Add a number of missing C++11 operations to Atomic class. Invoke the 64 bit routines in QuasiAtomic when necessary. Replace QuasiAtomic membars with fences that correspond to C++11 fences. QuasiAtomic was moved to the top of the file. Only fence implementations actually changed. This replaces some buggy uses of MembarStoreStore, as reported in b/14685856 . Avoid some redundant fences for long volatile operations. Incompletely converts low-level memory access operations to Atomic. Change-Id: Iea828431a0cea46540eb74fcaa02071cab6fdcda
Diffstat (limited to 'runtime/monitor.cc')
-rw-r--r--runtime/monitor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 58e6dd49f9..f73ef1e3de 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -694,7 +694,7 @@ mirror::Object* Monitor::MonitorEnter(Thread* self, mirror::Object* obj) {
case LockWord::kUnlocked: {
LockWord thin_locked(LockWord::FromThinLockId(thread_id, 0));
if (h_obj->CasLockWord(lock_word, thin_locked)) {
- QuasiAtomic::MembarLoadLoad();
+ // CasLockWord enforces more than the acquire ordering we need here.
return h_obj.Get(); // Success!
}
continue; // Go again.