summaryrefslogtreecommitdiff
path: root/runtime/mirror/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r--runtime/mirror/object.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index f652202999..fd31dfbbb5 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -100,8 +100,10 @@ class MANAGED LOCKABLE Object {
return OFFSET_OF_OBJECT_MEMBER(Object, monitor_);
}
- LockWord GetLockWord();
- void SetLockWord(LockWord new_val);
+ // As volatile can be false if the mutators are suspended. This is an optimization since it
+ // avoids the barriers.
+ LockWord GetLockWord(bool as_volatile);
+ void SetLockWord(LockWord new_val, bool as_volatile);
bool CasLockWord(LockWord old_val, LockWord new_val) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
uint32_t GetLockOwnerThreadId();