Lines Matching refs:t
120 TestClass t = new TestClass(); in testGetAndPutAndCAS() local
125 check(unsafe.getInt(t, intOffset), 0, "Unsafe.getInt(Object, long) - initial"); in testGetAndPutAndCAS()
126 unsafe.putInt(t, intOffset, intValue); in testGetAndPutAndCAS()
127 check(t.intVar, intValue, "Unsafe.putInt(Object, long, int)"); in testGetAndPutAndCAS()
128 check(unsafe.getInt(t, intOffset), intValue, "Unsafe.getInt(Object, long)"); in testGetAndPutAndCAS()
133 check(unsafe.getLong(t, longOffset), 0, "Unsafe.getLong(Object, long) - initial"); in testGetAndPutAndCAS()
134 unsafe.putLong(t, longOffset, longValue); in testGetAndPutAndCAS()
135 check(t.longVar, longValue, "Unsafe.putLong(Object, long, long)"); in testGetAndPutAndCAS()
136 check(unsafe.getLong(t, longOffset), longValue, "Unsafe.getLong(Object, long)"); in testGetAndPutAndCAS()
141 check(unsafe.getObject(t, objectOffset), null, "Unsafe.getObject(Object, long) - initial"); in testGetAndPutAndCAS()
142 unsafe.putObject(t, objectOffset, objectValue); in testGetAndPutAndCAS()
143 check(t.objectVar, objectValue, "Unsafe.putObject(Object, long, Object)"); in testGetAndPutAndCAS()
144 check(unsafe.getObject(t, objectOffset), objectValue, "Unsafe.getObject(Object, long)"); in testGetAndPutAndCAS()
146 if (unsafe.compareAndSwapInt(t, intOffset, 0, 1)) { in testGetAndPutAndCAS()
149 if (!unsafe.compareAndSwapInt(t, intOffset, intValue, 0)) { in testGetAndPutAndCAS()
153 if (!unsafe.compareAndSwapInt(t, intOffset, 0, 1)) { in testGetAndPutAndCAS()
158 if (!unsafe.compareAndSwapInt(t, intOffset, 1, 1)) { in testGetAndPutAndCAS()
162 if (unsafe.compareAndSwapLong(t, longOffset, 0, 1)) { in testGetAndPutAndCAS()
165 if (!unsafe.compareAndSwapLong(t, longOffset, longValue, 0)) { in testGetAndPutAndCAS()
169 if (!unsafe.compareAndSwapLong(t, longOffset, 0, 1)) { in testGetAndPutAndCAS()
174 if (!unsafe.compareAndSwapLong(t, longOffset, 1, 1)) { in testGetAndPutAndCAS()
183 if (unsafe.compareAndSwapObject(t, objectOffset, new Object(), new Object())) { in testGetAndPutAndCAS()
188 if (!unsafe.compareAndSwapObject(t, objectOffset, objectValue, objectValue2)) { in testGetAndPutAndCAS()
193 if (!unsafe.compareAndSwapObject(t, objectOffset, objectValue2, objectValue3)) { in testGetAndPutAndCAS()
199 if (!unsafe.compareAndSwapObject(t, objectOffset, objectValue3, objectValue3)) { in testGetAndPutAndCAS()
205 if (!unsafe.compareAndSwapObject(t, objectOffset, objectValue3, t)) { in testGetAndPutAndCAS()
211 if (!unsafe.compareAndSwapObject(t, objectOffset, t, t)) { in testGetAndPutAndCAS()
216 if (!unsafe.compareAndSwapObject(t, objectOffset, t, new Object())) { in testGetAndPutAndCAS()
223 TestClass t = new TestClass(); in testCompareAndSet() local
228 unsafe.putInt(t, intOffset, intValue); in testCompareAndSet()
233 unsafe.putLong(t, longOffset, longValue); in testCompareAndSet()
238 unsafe.putObject(t, objectOffset, objectValue); in testCompareAndSet()
240 if (unsafe.compareAndSetInt(t, intOffset, 0, 1)) { in testCompareAndSet()
243 check(t.intVar, intValue, "Unsafe.compareAndSetInt(Object, long, int, int) - not set"); in testCompareAndSet()
244 if (!unsafe.compareAndSetInt(t, intOffset, intValue, 0)) { in testCompareAndSet()
248 check(t.intVar, 0, "Unsafe.compareAndSetInt(Object, long, int, int) - gets set"); in testCompareAndSet()
249 if (!unsafe.compareAndSetInt(t, intOffset, 0, 1)) { in testCompareAndSet()
252 check(t.intVar, 1, "Unsafe.compareAndSetInt(Object, long, int, int) - gets re-set"); in testCompareAndSet()
255 if (!unsafe.compareAndSetInt(t, intOffset, 1, 1)) { in testCompareAndSet()
258 check(t.intVar, 1, "Unsafe.compareAndSetInt(Object, long, int, int) - gets set to same"); in testCompareAndSet()
260 if (unsafe.compareAndSetLong(t, longOffset, 0, 1)) { in testCompareAndSet()
263 check(t.longVar, longValue, "Unsafe.compareAndSetLong(Object, long, long, long) - not set"); in testCompareAndSet()
264 if (!unsafe.compareAndSetLong(t, longOffset, longValue, 0)) { in testCompareAndSet()
268 check(t.longVar, 0, "Unsafe.compareAndSetLong(Object, long, long, long) - gets set"); in testCompareAndSet()
269 if (!unsafe.compareAndSetLong(t, longOffset, 0, 1)) { in testCompareAndSet()
272 check(t.longVar, 1, "Unsafe.compareAndSetLong(Object, long, long, long) - gets re-set"); in testCompareAndSet()
275 if (!unsafe.compareAndSetLong(t, longOffset, 1, 1)) { in testCompareAndSet()
278 check(t.longVar, 1, "Unsafe.compareAndSetLong(Object, long, long, long) - gets set to same"); in testCompareAndSet()
285 if (unsafe.compareAndSetObject(t, objectOffset, new Object(), new Object())) { in testCompareAndSet()
288 …check(t.objectVar, objectValue, "Unsafe.compareAndSetObject(Object, long, Object, Object) - not se… in testCompareAndSet()
290 if (!unsafe.compareAndSetObject(t, objectOffset, objectValue, objectValue2)) { in testCompareAndSet()
294 …check(t.objectVar, objectValue2, "Unsafe.compareAndSetObject(Object, long, Object, Object) - gets … in testCompareAndSet()
296 if (!unsafe.compareAndSetObject(t, objectOffset, objectValue2, objectValue3)) { in testCompareAndSet()
299 …check(t.objectVar, objectValue3, "Unsafe.compareAndSetObject(Object, long, Object, Object) - gets … in testCompareAndSet()
302 if (!unsafe.compareAndSetObject(t, objectOffset, objectValue3, objectValue3)) { in testCompareAndSet()
305 …check(t.objectVar, objectValue3, "Unsafe.compareAndSetObject(Object, long, Object, Object) - gets … in testCompareAndSet()
308 unsafe.putObject(t, objectOffset, objectValue); in testCompareAndSet()
310 if (unsafe.compareAndSetReference(t, objectOffset, new Object(), new Object())) { in testCompareAndSet()
313 …check(t.objectVar, objectValue, "Unsafe.compareAndSetReference(Object, long, Object, Object) - not… in testCompareAndSet()
315 if (!unsafe.compareAndSetReference(t, objectOffset, objectValue, objectValue2)) { in testCompareAndSet()
319 …check(t.objectVar, objectValue2, "Unsafe.compareAndSetReference(Object, long, Object, Object) - ge… in testCompareAndSet()
321 if (!unsafe.compareAndSetReference(t, objectOffset, objectValue2, objectValue3)) { in testCompareAndSet()
324 …check(t.objectVar, objectValue3, "Unsafe.compareAndSetReference(Object, long, Object, Object) - ge… in testCompareAndSet()
327 if (!unsafe.compareAndSetReference(t, objectOffset, objectValue3, objectValue3)) { in testCompareAndSet()
330 …check(t.objectVar, objectValue3, "Unsafe.compareAndSetReference(Object, long, Object, Object) - ge… in testCompareAndSet()