Home
last modified time | relevance | path

Searched refs:getAndAdd (Results 1 – 25 of 69) sorted by relevance

123

/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicLong.java223 return (long)VALUE.getAndAdd(this, 1L); in getAndIncrement()
237 return (long)VALUE.getAndAdd(this, -1L); in getAndDecrement()
247 public final long getAndAdd(long delta) { in getAndAdd() method in AtomicLong
250 return (long)VALUE.getAndAdd(this, delta); in getAndAdd()
264 return (long)VALUE.getAndAdd(this, 1L) + 1L; in incrementAndGet()
278 return (long)VALUE.getAndAdd(this, -1L) - 1L; in decrementAndGet()
291 return (long)VALUE.getAndAdd(this, delta) + delta; in addAndGet()
DAtomicInteger.java206 return (int)VALUE.getAndAdd(this, 1); in getAndIncrement()
220 return (int)VALUE.getAndAdd(this, -1); in getAndDecrement()
230 public final int getAndAdd(int delta) { in getAndAdd() method in AtomicInteger
233 return (int)VALUE.getAndAdd(this, delta); in getAndAdd()
247 return (int)VALUE.getAndAdd(this, 1) + 1; in incrementAndGet()
261 return (int)VALUE.getAndAdd(this, -1) - 1; in decrementAndGet()
274 return (int)VALUE.getAndAdd(this, delta) + delta; in addAndGet()
DAtomicLongArray.java196 return (long)AA.getAndAdd(array, i, 1L); in getAndIncrement()
209 return (long)AA.getAndAdd(array, i, -1L); in getAndDecrement()
220 public final long getAndAdd(int i, long delta) { in getAndAdd() method in AtomicLongArray
221 return (long)AA.getAndAdd(array, i, delta); in getAndAdd()
234 return (long)AA.getAndAdd(array, i, 1L) + 1L; in incrementAndGet()
247 return (long)AA.getAndAdd(array, i, -1L) - 1L; in decrementAndGet()
259 return (long)AA.getAndAdd(array, i, delta) + delta; in addAndGet()
DAtomicIntegerArray.java196 return (int)AA.getAndAdd(array, i, 1); in getAndIncrement()
209 return (int)AA.getAndAdd(array, i, -1); in getAndDecrement()
220 public final int getAndAdd(int i, int delta) { in getAndAdd() method in AtomicIntegerArray
221 return (int)AA.getAndAdd(array, i, delta); in getAndAdd()
234 return (int)AA.getAndAdd(array, i, 1) + 1; in incrementAndGet()
247 return (int)AA.getAndAdd(array, i, -1) - 1; in decrementAndGet()
259 return (int)AA.getAndAdd(array, i, delta) + delta; in addAndGet()
DAtomicIntegerFieldUpdater.java219 public int getAndAdd(T obj, int delta) { in getAndAdd() method in AtomicIntegerFieldUpdater
536 public final int getAndAdd(T obj, int delta) { in getAndAdd() method in AtomicIntegerFieldUpdater.AtomicIntegerFieldUpdaterImpl
542 return getAndAdd(obj, 1); in getAndIncrement()
546 return getAndAdd(obj, -1); in getAndDecrement()
550 return getAndAdd(obj, 1) + 1; in incrementAndGet()
554 return getAndAdd(obj, -1) - 1; in decrementAndGet()
558 return getAndAdd(obj, delta) + delta; in addAndGet()
DAtomicLongFieldUpdater.java222 public long getAndAdd(T obj, long delta) { in getAndAdd() method in AtomicLongFieldUpdater
502 public final long getAndAdd(T obj, long delta) { in getAndAdd() method in AtomicLongFieldUpdater.CASUpdater
508 return getAndAdd(obj, 1); in getAndIncrement()
512 return getAndAdd(obj, -1); in getAndDecrement()
516 return getAndAdd(obj, 1) + 1; in incrementAndGet()
520 return getAndAdd(obj, -1) - 1; in decrementAndGet()
524 return getAndAdd(obj, delta) + delta; in addAndGet()
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/
DVarHandleTestMethodTypeDouble.java649 double x = (double) vh.getAndAdd(null, 1.0d); in testInstanceFieldWrongMethodType()
652 double x = (double) vh.getAndAdd(Void.class, 1.0d); in testInstanceFieldWrongMethodType()
655 double x = (double) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 double x = (double) vh.getAndAdd(0, 1.0d); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, 1.0d); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, 1.0d); in testInstanceFieldWrongMethodType()
669 double x = (double) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 double x = (double) vh.getAndAdd(recv, 1.0d, Void.class); in testInstanceFieldWrongMethodType()
1282 double x = (double) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1286 Void r = (Void) vh.getAndAdd(1.0d); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeFloat.java649 float x = (float) vh.getAndAdd(null, 1.0f); in testInstanceFieldWrongMethodType()
652 float x = (float) vh.getAndAdd(Void.class, 1.0f); in testInstanceFieldWrongMethodType()
655 float x = (float) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 float x = (float) vh.getAndAdd(0, 1.0f); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, 1.0f); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, 1.0f); in testInstanceFieldWrongMethodType()
669 float x = (float) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 float x = (float) vh.getAndAdd(recv, 1.0f, Void.class); in testInstanceFieldWrongMethodType()
1282 float x = (float) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1286 Void r = (Void) vh.getAndAdd(1.0f); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeLong.java649 long x = (long) vh.getAndAdd(null, 0x0123456789ABCDEFL); in testInstanceFieldWrongMethodType()
652 long x = (long) vh.getAndAdd(Void.class, 0x0123456789ABCDEFL); in testInstanceFieldWrongMethodType()
655 long x = (long) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 long x = (long) vh.getAndAdd(0, 0x0123456789ABCDEFL); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, 0x0123456789ABCDEFL); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, 0x0123456789ABCDEFL); in testInstanceFieldWrongMethodType()
669 long x = (long) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 long x = (long) vh.getAndAdd(recv, 0x0123456789ABCDEFL, Void.class); in testInstanceFieldWrongMethodType()
1586 long x = (long) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1590 Void r = (Void) vh.getAndAdd(0x0123456789ABCDEFL); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeInt.java649 int x = (int) vh.getAndAdd(null, 0x01234567); in testInstanceFieldWrongMethodType()
652 int x = (int) vh.getAndAdd(Void.class, 0x01234567); in testInstanceFieldWrongMethodType()
655 int x = (int) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 int x = (int) vh.getAndAdd(0, 0x01234567); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, 0x01234567); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, 0x01234567); in testInstanceFieldWrongMethodType()
669 int x = (int) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 int x = (int) vh.getAndAdd(recv, 0x01234567, Void.class); in testInstanceFieldWrongMethodType()
1586 int x = (int) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1590 Void r = (Void) vh.getAndAdd(0x01234567); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeByte.java649 byte x = (byte) vh.getAndAdd(null, (byte)0x01); in testInstanceFieldWrongMethodType()
652 byte x = (byte) vh.getAndAdd(Void.class, (byte)0x01); in testInstanceFieldWrongMethodType()
655 byte x = (byte) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 byte x = (byte) vh.getAndAdd(0, (byte)0x01); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, (byte)0x01); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, (byte)0x01); in testInstanceFieldWrongMethodType()
669 byte x = (byte) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 byte x = (byte) vh.getAndAdd(recv, (byte)0x01, Void.class); in testInstanceFieldWrongMethodType()
1586 byte x = (byte) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1590 Void r = (Void) vh.getAndAdd((byte)0x01); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeShort.java649 short x = (short) vh.getAndAdd(null, (short)0x0123); in testInstanceFieldWrongMethodType()
652 short x = (short) vh.getAndAdd(Void.class, (short)0x0123); in testInstanceFieldWrongMethodType()
655 short x = (short) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 short x = (short) vh.getAndAdd(0, (short)0x0123); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, (short)0x0123); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, (short)0x0123); in testInstanceFieldWrongMethodType()
669 short x = (short) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 short x = (short) vh.getAndAdd(recv, (short)0x0123, Void.class); in testInstanceFieldWrongMethodType()
1586 short x = (short) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1590 Void r = (Void) vh.getAndAdd((short)0x0123); in testStaticFieldWrongMethodType()
[all …]
DVarHandleTestMethodTypeChar.java649 char x = (char) vh.getAndAdd(null, '\u0123'); in testInstanceFieldWrongMethodType()
652 char x = (char) vh.getAndAdd(Void.class, '\u0123'); in testInstanceFieldWrongMethodType()
655 char x = (char) vh.getAndAdd(recv, Void.class); in testInstanceFieldWrongMethodType()
658 char x = (char) vh.getAndAdd(0, '\u0123'); in testInstanceFieldWrongMethodType()
662 Void r = (Void) vh.getAndAdd(recv, '\u0123'); in testInstanceFieldWrongMethodType()
665 boolean x = (boolean) vh.getAndAdd(recv, '\u0123'); in testInstanceFieldWrongMethodType()
669 char x = (char) vh.getAndAdd(); in testInstanceFieldWrongMethodType()
672 char x = (char) vh.getAndAdd(recv, '\u0123', Void.class); in testInstanceFieldWrongMethodType()
1586 char x = (char) vh.getAndAdd(Void.class); in testStaticFieldWrongMethodType()
1590 Void r = (Void) vh.getAndAdd('\u0123'); in testStaticFieldWrongMethodType()
[all …]
DVarHandleMethodReferenceTest.java82 r = vh::getAndAdd; in testMethodReferences()
/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicLongTest.java134 assertEquals(1, ai.getAndAdd(2)); in testGetAndAdd()
136 assertEquals(3, ai.getAndAdd(-4)); in testGetAndAdd()
DAtomicIntegerTest.java132 assertEquals(1, ai.getAndAdd(2)); in testGetAndAdd()
134 assertEquals(3, ai.getAndAdd(-4)); in testGetAndAdd()
DAtomicLongArrayTest.java86 aa.getAndAdd(index, 1); in testIndexing()
199 assertEquals(1, aa.getAndAdd(i, 2)); in testGetAndAdd()
201 assertEquals(3, aa.getAndAdd(i, -4)); in testGetAndAdd()
DAtomicIntegerArrayTest.java87 aa.getAndAdd(index, 1); in testIndexing()
200 assertEquals(1, aa.getAndAdd(i, 2)); in testGetAndAdd()
202 assertEquals(3, aa.getAndAdd(i, -4)); in testGetAndAdd()
DAtomicIntegerFieldUpdaterTest.java265 assertEquals(1, a.getAndAdd(this, 2)); in testGetAndAdd()
267 assertEquals(3, a.getAndAdd(this, -4)); in testGetAndAdd()
DAtomicLongFieldUpdaterTest.java265 assertEquals(1, a.getAndAdd(this, 2)); in testGetAndAdd()
267 assertEquals(3, a.getAndAdd(this, -4)); in testGetAndAdd()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAtomicIntegerArrayTest.java110 aa.getAndAdd(index, 1); in testIndexing()
223 assertEquals(1, aa.getAndAdd(i, 2)); in testGetAndAdd()
225 assertEquals(3, aa.getAndAdd(i, -4)); in testGetAndAdd()
DAtomicLongArrayTest.java109 aa.getAndAdd(index, 1); in testIndexing()
222 assertEquals(1, aa.getAndAdd(i, 2)); in testGetAndAdd()
224 assertEquals(3, aa.getAndAdd(i, -4)); in testGetAndAdd()
DAtomicLongTest.java157 assertEquals(1, ai.getAndAdd(2)); in testGetAndAdd()
159 assertEquals(3, ai.getAndAdd(-4)); in testGetAndAdd()
DAtomicIntegerTest.java155 assertEquals(1, ai.getAndAdd(2)); in testGetAndAdd()
157 assertEquals(3, ai.getAndAdd(-4)); in testGetAndAdd()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/atomic/
DAtomicInteger.java83 public final int getAndAdd(int delta) { in getAndAdd() method in AtomicInteger

123