summaryrefslogtreecommitdiff
path: root/runtime/mirror/object.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-04-17 23:06:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-04-17 23:06:27 +0000
commita092ee404ababbf8fc945111dc4a571284c9f02f (patch)
treeb275ab9eedb86dcba9b62ed3be2c123f9322cf29 /runtime/mirror/object.h
parent94e8a97310af35cb0bae309e796b554cdb586ca5 (diff)
parent4d7f61d44a732cfbc8573e5d93364983fd746888 (diff)
Merge "Use non volatile lock words in semispace collector."
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();