diff options
| author | 2018-06-19 01:09:01 +0000 | |
|---|---|---|
| committer | 2018-06-19 01:09:01 +0000 | |
| commit | 2c12bb624e91d8f1282d868fd2f2e33ba3746d6c (patch) | |
| tree | b378c9a7051ce84c3c22847be179845a04d76376 /runtime/mirror/object.h | |
| parent | e3435cb810a5c48626a1564dbed0ae4dda89d57b (diff) | |
| parent | 8bb3c68422ce06f444d7c4e49c7af7b1c5cbeb7c (diff) | |
Merge "Use strong CAS for identity hash code"
Diffstat (limited to 'runtime/mirror/object.h')
| -rw-r--r-- | runtime/mirror/object.h | 10 |
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) |