diff options
author | Hans Boehm <hboehm@google.com> | 2014-06-06 23:45:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-06 23:45:52 +0000 |
commit | c2bb441a65c5d1dd0b73d04489514ab09bd53c8a (patch) | |
tree | a19fbf8372a40441812facb27ec0f661bf395f7c /runtime/native | |
parent | 4479ba35389b03ccc9eabd17fba6168f9505517a (diff) | |
parent | 3035961cb41865b80b927546be0c708b6389cec6 (diff) | |
download | art-c2bb441a65c5d1dd0b73d04489514ab09bd53c8a.zip art-c2bb441a65c5d1dd0b73d04489514ab09bd53c8a.tar.gz art-c2bb441a65c5d1dd0b73d04489514ab09bd53c8a.tar.bz2 |
Merge "Clean up and augment Atomic class. Replace QuasiAtomic MemBars."
Diffstat (limited to 'runtime/native')
-rw-r--r-- | runtime/native/sun_misc_Unsafe.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/native/sun_misc_Unsafe.cc b/runtime/native/sun_misc_Unsafe.cc index 764db5e..d23cfff 100644 --- a/runtime/native/sun_misc_Unsafe.cc +++ b/runtime/native/sun_misc_Unsafe.cc @@ -83,7 +83,7 @@ static void Unsafe_putOrderedInt(JNIEnv* env, jobject, jobject javaObj, jlong of jint newValue) { ScopedFastNativeObjectAccess soa(env); mirror::Object* obj = soa.Decode<mirror::Object*>(javaObj); - QuasiAtomic::MembarStoreStore(); + QuasiAtomic::ThreadFenceRelease(); // JNI must use non transactional mode. obj->SetField32<false>(MemberOffset(offset), newValue); } @@ -119,7 +119,7 @@ static void Unsafe_putOrderedLong(JNIEnv* env, jobject, jobject javaObj, jlong o jlong newValue) { ScopedFastNativeObjectAccess soa(env); mirror::Object* obj = soa.Decode<mirror::Object*>(javaObj); - QuasiAtomic::MembarStoreStore(); + QuasiAtomic::ThreadFenceRelease(); // JNI must use non transactional mode. obj->SetField64<false>(MemberOffset(offset), newValue); } @@ -161,7 +161,7 @@ static void Unsafe_putOrderedObject(JNIEnv* env, jobject, jobject javaObj, jlong ScopedFastNativeObjectAccess soa(env); mirror::Object* obj = soa.Decode<mirror::Object*>(javaObj); mirror::Object* newValue = soa.Decode<mirror::Object*>(javaNewValue); - QuasiAtomic::MembarStoreStore(); + QuasiAtomic::ThreadFenceRelease(); // JNI must use non transactional mode. obj->SetFieldObject<false>(MemberOffset(offset), newValue); } |