summaryrefslogtreecommitdiff
path: root/runtime/mirror/object.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-06-19 01:09:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-06-19 01:09:01 +0000
commit2c12bb624e91d8f1282d868fd2f2e33ba3746d6c (patch)
treeb378c9a7051ce84c3c22847be179845a04d76376 /runtime/mirror/object.h
parente3435cb810a5c48626a1564dbed0ae4dda89d57b (diff)
parent8bb3c68422ce06f444d7c4e49c7af7b1c5cbeb7c (diff)
Merge "Use strong CAS for identity hash code"
Diffstat (limited to 'runtime/mirror/object.h')
-rw-r--r--runtime/mirror/object.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index a89d6323a5..f92ff1e2af 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -159,6 +159,8 @@ class MANAGED LOCKABLE Object {
REQUIRES_SHARED(Locks::mutator_lock_);
bool CasLockWordWeakRelease(LockWord old_val, LockWord new_val)
REQUIRES_SHARED(Locks::mutator_lock_);
+ bool CasLockWordStrongRelaxed(LockWord old_val, LockWord new_val)
+ REQUIRES_SHARED(Locks::mutator_lock_);
uint32_t GetLockOwnerThreadId();
// Try to enter the monitor, returns non null if we succeeded.
@@ -539,6 +541,14 @@ class MANAGED LOCKABLE Object {
template<bool kTransactionActive,
bool kCheckTransaction = true,
VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
+ ALWAYS_INLINE bool CasFieldStrongRelaxed32(MemberOffset field_offset,
+ int32_t old_value,
+ int32_t new_value)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
+ template<bool kTransactionActive,
+ bool kCheckTransaction = true,
+ VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
ALWAYS_INLINE bool CasFieldWeakAcquire32(MemberOffset field_offset,
int32_t old_value,
int32_t new_value)