OSDN Git Service

Properly handle volatile field accesses from JNI.
authorAndy McFadden <fadden@android.com>
Wed, 18 Aug 2010 22:51:37 +0000 (15:51 -0700)
committerAndy McFadden <fadden@android.com>
Fri, 20 Aug 2010 21:35:47 +0000 (14:35 -0700)
commitf16cfefc199d1416c5f83446c1d299786accc737
treeb8a9a878dc343302e2f9a0165f7db8e48d20618b
parent30febfdf4abe39f99dec100de968cb831b555b27
Properly handle volatile field accesses from JNI.

For uniprocessors, we need to use the 64-bit quasiatomic functions.  For
SMP, we need to do that and also issue barriers on all operations.

This was mostly a matter of adding a bunch of inline getter/setter
functions and then calling the right one based on whether or not the
field is declared volatile.

Also, corrected the output for a failing CHECK_CLASS test in CheckJNI.

Bug 2890631.

(cherry-pick from dalvik-dev)

Change-Id: I3da3b70c906eddd5934347caea83ab041d22cd68
vm/CheckJni.c
vm/Jni.c
vm/oo/ObjectInlines.h