From 3035961cb41865b80b927546be0c708b6389cec6 Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Wed, 21 May 2014 17:46:23 -0700 Subject: 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 --- runtime/monitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/monitor.cc') 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. -- cgit v1.2.3