Searched refs:getAndSet (Results 1 - 25 of 75) sorted by relevance

123

/openjdk10/hotspot/test/compiler/c1/
H A DTest6849574.java42 a.getAndSet(9999, new Object());
/openjdk10/hotspot/test/compiler/regalloc/
H A DC1ObjectSpillInLogicOp.java48 x.getAndSet(i % x.length(), y);
/openjdk10/hotspot/test/compiler/c2/
H A DTest8007722.java43 Test8007722 o = ref.getAndSet(new_obj);
/openjdk10/jdk/src/java.base/share/classes/java/nio/channels/
H A DSelectionKey.java386 return attachmentUpdater.getAndSet(this, ob);
/openjdk10/jdk/src/java.base/share/classes/java/util/concurrent/atomic/
H A DAtomicBoolean.java168 * with memory effects as specified by {@link VarHandle#getAndSet}.
173 public final boolean getAndSet(boolean newValue) { method in class:AtomicBoolean
174 return (int)VALUE.getAndSet(this, (newValue ? 1 : 0)) != 0;
H A DAtomicReference.java162 * with memory effects as specified by {@link VarHandle#getAndSet}.
168 public final V getAndSet(V newValue) { method in class:AtomicReference
169 return (V)VALUE.getAndSet(this, newValue);
/openjdk10/jdk/test/java/util/concurrent/tck/
H A DAtomicReferenceTest.java136 * getAndSet returns previous value and sets to given value
140 assertSame(one, ai.getAndSet(zero));
141 assertSame(zero, ai.getAndSet(m10));
142 assertSame(m10, ai.getAndSet(one));
H A DAtomicIntegerFieldUpdaterTest.java269 * getAndSet returns previous value and sets to given value
275 assertEquals(1, a.getAndSet(this, 0));
276 assertEquals(0, a.getAndSet(this, -10));
277 assertEquals(-10, a.getAndSet(this, 1));
H A DAtomicIntegerTest.java140 * getAndSet returns previous value and sets to given value
144 assertEquals(1, ai.getAndSet(0));
145 assertEquals(0, ai.getAndSet(-10));
146 assertEquals(-10, ai.getAndSet(1));
H A DAtomicLongFieldUpdaterTest.java269 * getAndSet returns previous value and sets to given value
275 assertEquals(1, a.getAndSet(this, 0));
276 assertEquals(0, a.getAndSet(this, -10));
277 assertEquals(-10, a.getAndSet(this, 1));
H A DAtomicReferenceFieldUpdaterTest.java254 * getAndSet returns previous value and sets to given value
260 assertSame(one, a.getAndSet(this, zero));
261 assertSame(zero, a.getAndSet(this, m10));
262 assertSame(m10, a.getAndSet(this, 1));
H A DAtomicLongTest.java142 * getAndSet returns previous value and sets to given value
146 assertEquals(1, ai.getAndSet(0));
147 assertEquals(0, ai.getAndSet(-10));
148 assertEquals(-10, ai.getAndSet(1));
H A DAtomicReferenceArrayTest.java210 * getAndSet returns previous value and sets to given value at given index
216 assertSame(one, aa.getAndSet(i, zero));
217 assertSame(zero, aa.getAndSet(i, m10));
218 assertSame(m10, aa.getAndSet(i, one));
H A DAtomicIntegerArrayTest.java203 * getAndSet returns previous value and sets to given value at given index
209 assertEquals(1, aa.getAndSet(i, 0));
210 assertEquals(0, aa.getAndSet(i, -10));
211 assertEquals(-10, aa.getAndSet(i, 1));
H A DAtomicLongArrayTest.java202 * getAndSet returns previous value and sets to given value at given index
208 assertEquals(1, aa.getAndSet(i, 0));
209 assertEquals(0, aa.getAndSet(i, -10));
210 assertEquals(-10, aa.getAndSet(i, 1));
H A DAtomicBooleanTest.java136 * getAndSet returns previous value and sets to given value
144 assertEquals(before, ai.getAndSet(after));
/openjdk10/jdk/src/java.base/share/classes/java/nio/channels/spi/
H A DAbstractSelector.java108 boolean open = selectorOpen.getAndSet(false);
/openjdk10/jdk/test/java/lang/invoke/VarHandles/
H A DVarHandleTestMethodTypeString.java559 String x = (String) vh.getAndSet(null, "foo");
562 String x = (String) vh.getAndSet(Void.class, "foo");
565 String x = (String) vh.getAndSet(recv, Void.class);
568 String x = (String) vh.getAndSet(0, "foo");
572 Void r = (Void) vh.getAndSet(recv, "foo");
575 boolean x = (boolean) vh.getAndSet(recv, "foo");
579 String x = (String) vh.getAndSet();
582 String x = (String) vh.getAndSet(recv, "foo", Void.class);
1095 String x = (String) vh.getAndSet(Void.class);
1099 Void r = (Void) vh.getAndSet("fo
[all...]
H A DVarHandleTestMethodTypeChar.java559 char x = (char) vh.getAndSet(null, '\u0123');
562 char x = (char) vh.getAndSet(Void.class, '\u0123');
565 char x = (char) vh.getAndSet(recv, Void.class);
568 char x = (char) vh.getAndSet(0, '\u0123');
572 Void r = (Void) vh.getAndSet(recv, '\u0123');
575 boolean x = (boolean) vh.getAndSet(recv, '\u0123');
579 char x = (char) vh.getAndSet();
582 char x = (char) vh.getAndSet(recv, '\u0123', Void.class);
1521 char x = (char) vh.getAndSet(Void.class);
1525 Void r = (Void) vh.getAndSet('\u012
[all...]
H A DVarHandleTestMethodTypeBoolean.java559 boolean x = (boolean) vh.getAndSet(null, true);
562 boolean x = (boolean) vh.getAndSet(Void.class, true);
565 boolean x = (boolean) vh.getAndSet(recv, Void.class);
568 boolean x = (boolean) vh.getAndSet(0, true);
572 Void r = (Void) vh.getAndSet(recv, true);
575 int x = (int) vh.getAndSet(recv, true);
579 boolean x = (boolean) vh.getAndSet();
582 boolean x = (boolean) vh.getAndSet(recv, true, Void.class);
1399 boolean x = (boolean) vh.getAndSet(Void.class);
1403 Void r = (Void) vh.getAndSet(tru
[all...]
H A DVarHandleTestMethodTypeDouble.java559 double x = (double) vh.getAndSet(null, 1.0d);
562 double x = (double) vh.getAndSet(Void.class, 1.0d);
565 double x = (double) vh.getAndSet(recv, Void.class);
568 double x = (double) vh.getAndSet(0, 1.0d);
572 Void r = (Void) vh.getAndSet(recv, 1.0d);
575 boolean x = (boolean) vh.getAndSet(recv, 1.0d);
579 double x = (double) vh.getAndSet();
582 double x = (double) vh.getAndSet(recv, 1.0d, Void.class);
1217 double x = (double) vh.getAndSet(Void.class);
1221 Void r = (Void) vh.getAndSet(1.
[all...]
H A DVarHandleTestMethodTypeFloat.java559 float x = (float) vh.getAndSet(null, 1.0f);
562 float x = (float) vh.getAndSet(Void.class, 1.0f);
565 float x = (float) vh.getAndSet(recv, Void.class);
568 float x = (float) vh.getAndSet(0, 1.0f);
572 Void r = (Void) vh.getAndSet(recv, 1.0f);
575 boolean x = (boolean) vh.getAndSet(recv, 1.0f);
579 float x = (float) vh.getAndSet();
582 float x = (float) vh.getAndSet(recv, 1.0f, Void.class);
1217 float x = (float) vh.getAndSet(Void.class);
1221 Void r = (Void) vh.getAndSet(1.
[all...]
/openjdk10/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/
H A DDefaultPublisher.java90 long nbItemsDemanded = demand.getAndSet(0);
/openjdk10/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/
H A DJavadocTaskImpl.java92 if (!used.getAndSet(true)) {
/openjdk10/jdk/src/java.base/share/classes/sun/nio/ch/
H A DAsynchronousChannelGroupImpl.java263 if (shutdown.getAndSet(true)) {
301 if (shutdown.getAndSet(true))

Completed in 147 milliseconds

123