Lines Matching refs:unsafe
182 Unsafe unsafe = getUnsafe(); in testUnsafeGet() local
184 unsafe.objectFieldOffset(ManyFields.class.getField("testField0000")); in testUnsafeGet()
186 unsafe.objectFieldOffset(ManyFields.class.getField("testField0001")); in testUnsafeGet()
188 unsafe.objectFieldOffset(ManyFields.class.getField("testField1024")); in testUnsafeGet()
190 unsafe.objectFieldOffset(ManyFields.class.getField("testField4444")); in testUnsafeGet()
192 unsafe.objectFieldOffset(ManyFields.class.getField("testField4998")); in testUnsafeGet()
194 unsafe.objectFieldOffset(ManyFields.class.getField("testField4999")); in testUnsafeGet()
203 assertSameObject(f0000, unsafe.getObject(mf, f0000Offset)); in testUnsafeGet()
204 assertDifferentObject(f0000, unsafe.getObject(mf, f0001Offset)); in testUnsafeGet()
205 assertSameObject(f1024, unsafe.getObject(mf, f1024Offset)); in testUnsafeGet()
206 assertSameObject(f4444, unsafe.getObject(mf, f4444Offset)); in testUnsafeGet()
207 assertDifferentObject(f4999, unsafe.getObject(mf, f4998Offset)); in testUnsafeGet()
208 assertSameObject(f4999, unsafe.getObject(mf, f4999Offset)); in testUnsafeGet()
219 Unsafe unsafe = getUnsafe(); in testUnsafeCas() local
221 unsafe.objectFieldOffset(ManyFields.class.getField("testField0000")); in testUnsafeCas()
223 unsafe.objectFieldOffset(ManyFields.class.getField("testField0001")); in testUnsafeCas()
225 unsafe.objectFieldOffset(ManyFields.class.getField("testField1024")); in testUnsafeCas()
227 unsafe.objectFieldOffset(ManyFields.class.getField("testField4444")); in testUnsafeCas()
229 unsafe.objectFieldOffset(ManyFields.class.getField("testField4998")); in testUnsafeCas()
231 unsafe.objectFieldOffset(ManyFields.class.getField("testField4999")); in testUnsafeCas()
240 assertEqual(false, unsafe.compareAndSwapObject(mf, f0000Offset, f1024, f4444)); in testUnsafeCas()
241 assertEqual(false, unsafe.compareAndSwapObject(mf, f0001Offset, f1024, f4444)); in testUnsafeCas()
242 assertEqual(true, unsafe.compareAndSwapObject(mf, f1024Offset, f1024, f4444)); in testUnsafeCas()
243 assertEqual(true, unsafe.compareAndSwapObject(mf, f1024Offset, f4444, f1024)); in testUnsafeCas()
244 assertEqual(false, unsafe.compareAndSwapObject(mf, f1024Offset, f4444, f1024)); in testUnsafeCas()
245 assertEqual(false, unsafe.compareAndSwapObject(mf, f4444Offset, f1024, f4444)); in testUnsafeCas()
246 assertEqual(false, unsafe.compareAndSwapObject(mf, f4998Offset, f1024, f4444)); in testUnsafeCas()
247 assertEqual(false, unsafe.compareAndSwapObject(mf, f4999Offset, f1024, f4444)); in testUnsafeCas()
255 Unsafe unsafe = getUnsafe(); in testUnsafeCasRegression() local
257 unsafe.objectFieldOffset(ManyFields.class.getField("testField0001")); in testUnsafeCasRegression()
275 unsafe.compareAndSwapObject(mf, f0001Offset, f0000, null); // Ignore the result. in testUnsafeCasRegression()