Merge pull request #148 from dicej/objectFieldOffset

implement Unsafe.objectFieldOffset for the Avian class library
This commit is contained in:
Mike Jensen 2014-01-03 10:18:30 -08:00
commit 56253e3123

View File

@ -729,6 +729,14 @@ Avian_avian_Atomic_getOffset
(t, jfieldVmField(t, reinterpret_cast<object>(arguments[0])));
}
extern "C" AVIAN_EXPORT int64_t JNICALL
Avian_sun_misc_Unsafe_objectFieldOffset
(Thread* t, object, uintptr_t* arguments)
{
return fieldOffset
(t, jfieldVmField(t, reinterpret_cast<object>(arguments[1])));
}
extern "C" AVIAN_EXPORT int64_t JNICALL
Avian_avian_Atomic_compareAndSwapObject
(Thread* t, object, uintptr_t* arguments)