diff options
author | 2014-04-17 23:06:26 +0000 | |
---|---|---|
committer | 2014-04-17 23:06:27 +0000 | |
commit | a092ee404ababbf8fc945111dc4a571284c9f02f (patch) | |
tree | b275ab9eedb86dcba9b62ed3be2c123f9322cf29 /runtime/mirror/object.h | |
parent | 94e8a97310af35cb0bae309e796b554cdb586ca5 (diff) | |
parent | 4d7f61d44a732cfbc8573e5d93364983fd746888 (diff) |
Merge "Use non volatile lock words in semispace collector."
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r-- | runtime/mirror/object.h | 6 |
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(); |