HomeSort by relevance Sort by last modified time
    Searched defs:compareAndSet (Results 1 - 25 of 31) sorted by null

1 2

  /libcore/luni/src/main/java/java/util/concurrent/atomic/
AtomicMarkableReference.java 84 * appropriate alternative to {@code compareAndSet}.
117 public boolean compareAndSet(V expectedReference,
125 atomicRef.compareAndSet(current,
159 atomicRef.compareAndSet
AtomicReference.java 84 public final boolean compareAndSet(V expect, V update) {
94 * appropriate alternative to {@code compareAndSet}.
113 if (compareAndSet(x, newValue))
AtomicStampedReference.java 85 * appropriate alternative to {@code compareAndSet}.
119 public boolean compareAndSet(V expectedReference,
128 atomicRef.compareAndSet(current,
163 atomicRef.compareAndSet(current,
AtomicBoolean.java 69 public final boolean compareAndSet(boolean expect, boolean update) {
81 * appropriate alternative to {@code compareAndSet}.
122 if (compareAndSet(current, newValue))
AtomicInteger.java 91 if (compareAndSet(current, newValue))
105 public final boolean compareAndSet(int expect, int update) {
115 * appropriate alternative to {@code compareAndSet}.
134 if (compareAndSet(current, next))
148 if (compareAndSet(current, next))
163 if (compareAndSet(current, next))
177 if (compareAndSet(current, next))
191 if (compareAndSet(current, next))
206 if (compareAndSet(current, next))
AtomicIntegerArray.java 131 public final boolean compareAndSet(int i, int expect, int update) {
145 * appropriate alternative to {@code compareAndSet}.
153 return compareAndSet(i, expect, update);
AtomicLong.java 41 * Returns whether underlying JVM supports lockless CompareAndSet
116 if (compareAndSet(current, newValue))
130 public final boolean compareAndSet(long expect, long update) {
140 * appropriate alternative to {@code compareAndSet}.
159 if (compareAndSet(current, next))
173 if (compareAndSet(current, next))
188 if (compareAndSet(current, next))
202 if (compareAndSet(current, next))
216 if (compareAndSet(current, next))
231 if (compareAndSet(current, next)
    [all...]
AtomicLongArray.java 131 public final boolean compareAndSet(int i, long expect, long update) {
145 * appropriate alternative to {@code compareAndSet}.
153 return compareAndSet(i, expect, update);
AtomicReferenceArray.java 133 public final boolean compareAndSet(int i, E expect, E update) {
147 * appropriate alternative to {@code compareAndSet}.
155 return compareAndSet(i, expect, update);
AtomicReferenceFieldUpdater.java 34 * return leftUpdater.compareAndSet(this, expect, update);
40 * <p>Note that the guarantees of the {@code compareAndSet}
45 * {@code compareAndSet} and {@code set} on the same updater.
83 * other calls to {@code compareAndSet} and {@code set}, but not
91 public abstract boolean compareAndSet(T obj, V expect, V update);
97 * other calls to {@code compareAndSet} and {@code set}, but not
102 * appropriate alternative to {@code compareAndSet}.
114 * store with respect to subsequent invocations of {@code compareAndSet}.
151 if (compareAndSet(obj, current, newValue))
237 public boolean compareAndSet(T obj, V expect, V update)
    [all...]
AtomicIntegerFieldUpdater.java 22 * <p>Note that the guarantees of the {@code compareAndSet}
27 * {@code compareAndSet} and {@code set} on the same updater.
61 * other calls to {@code compareAndSet} and {@code set}, but not
71 public abstract boolean compareAndSet(T obj, int expect, int update);
77 * other calls to {@code compareAndSet} and {@code set}, but not
82 * appropriate alternative to {@code compareAndSet}.
96 * store with respect to subsequent invocations of {@code compareAndSet}.
134 if (compareAndSet(obj, current, newValue))
150 if (compareAndSet(obj, current, next))
166 if (compareAndSet(obj, current, next)
    [all...]
AtomicLongFieldUpdater.java 22 * <p>Note that the guarantees of the {@code compareAndSet}
27 * {@code compareAndSet} and {@code set} on the same updater.
64 * other calls to {@code compareAndSet} and {@code set}, but not
74 public abstract boolean compareAndSet(T obj, long expect, long update);
80 * other calls to {@code compareAndSet} and {@code set}, but not
85 * appropriate alternative to {@code compareAndSet}.
99 * store with respect to subsequent invocations of {@code compareAndSet}.
136 if (compareAndSet(obj, current, newValue))
152 if (compareAndSet(obj, current, next))
168 if (compareAndSet(obj, current, next)
    [all...]
  /libcore/luni/src/test/java/tests/api/java/util/concurrent/
AtomicMarkableReferenceTest.java 67 * compareAndSet succeeds in changing values if equal to expected reference
77 assertTrue(ai.compareAndSet(one, two, false, false));
81 assertTrue(ai.compareAndSet(two, m3, false, true));
85 assertFalse(ai.compareAndSet(two, m3, true, true));
91 * compareAndSet in one thread enables another waiting for reference value
98 while (!ai.compareAndSet(two, three, false, false))
103 assertTrue(ai.compareAndSet(one, two, false, false));
111 * compareAndSet in one thread enables another waiting for mark value
118 while (!ai.compareAndSet(one, one, true, false))
123 assertTrue(ai.compareAndSet(one, one, false, true))
    [all...]
AtomicReferenceFieldUpdaterTest.java 98 * compareAndSet succeeds in changing value if equal to expected else fails
108 assertTrue(a.compareAndSet(this,one,two));
109 assertTrue(a.compareAndSet(this,two,m4));
111 assertFalse(a.compareAndSet(this,m5,seven));
113 assertTrue(a.compareAndSet(this,m4,seven));
118 * compareAndSet in one thread enables another waiting for value
132 while (!a.compareAndSet(AtomicReferenceFieldUpdaterTest.this, two, three))
137 assertTrue(a.compareAndSet(this, one, two));
AtomicStampedReferenceTest.java 67 * compareAndSet succeeds in changing values if equal to expected reference
77 assertTrue(ai.compareAndSet(one, two, 0, 0));
81 assertTrue(ai.compareAndSet(two, m3, 0, 1));
85 assertFalse(ai.compareAndSet(two, m3, 1, 1));
91 * compareAndSet in one thread enables another waiting for reference value
98 while (!ai.compareAndSet(two, three, 0, 0))
103 assertTrue(ai.compareAndSet(one, two, 0, 0));
111 * compareAndSet in one thread enables another waiting for stamp value
118 while (!ai.compareAndSet(one, one, 1, 2))
123 assertTrue(ai.compareAndSet(one, one, 0, 1))
    [all...]
AtomicBooleanTest.java 61 * compareAndSet succeeds in changing value if equal to expected else fails
65 assertTrue(ai.compareAndSet(true,false));
67 assertTrue(ai.compareAndSet(false,false));
69 assertFalse(ai.compareAndSet(true,false));
71 assertTrue(ai.compareAndSet(false,true));
76 * compareAndSet in one thread enables another waiting for value
83 while (!ai.compareAndSet(false, true)) Thread.yield();
87 assertTrue(ai.compareAndSet(true, false));
AtomicIntegerFieldUpdaterTest.java 96 * compareAndSet succeeds in changing value if equal to expected else fails
106 assertTrue(a.compareAndSet(this,1,2));
107 assertTrue(a.compareAndSet(this,2,-4));
109 assertFalse(a.compareAndSet(this,-5,7));
111 assertTrue(a.compareAndSet(this,-4,7));
117 * compareAndSet in one thread enables another waiting for value
131 while (!a.compareAndSet(AtomicIntegerFieldUpdaterTest.this, 2, 3))
136 assertTrue(a.compareAndSet(this, 1, 2));
AtomicLongFieldUpdaterTest.java 98 * compareAndSet succeeds in changing value if equal to expected else fails
108 assertTrue(a.compareAndSet(this,1,2));
109 assertTrue(a.compareAndSet(this,2,-4));
111 assertFalse(a.compareAndSet(this,-5,7));
113 assertTrue(a.compareAndSet(this,-4,7));
119 * compareAndSet in one thread enables another waiting for value
133 while (!a.compareAndSet(AtomicLongFieldUpdaterTest.this, 2, 3))
138 assertTrue(a.compareAndSet(this, 1, 2));
AtomicReferenceArrayTest.java 112 * compareAndSet succeeds in changing value if equal to expected else fails
118 assertTrue(ai.compareAndSet(i, one,two));
119 assertTrue(ai.compareAndSet(i, two,m4));
121 assertFalse(ai.compareAndSet(i, m5,seven));
123 assertTrue(ai.compareAndSet(i, m4,seven));
129 * compareAndSet in one thread enables another waiting for value
137 while (!a.compareAndSet(0, two, three))
142 assertTrue(a.compareAndSet(0, one, two));
AtomicReferenceTest.java 61 * compareAndSet succeeds in changing value if equal to expected else fails
65 assertTrue(ai.compareAndSet(one,two));
66 assertTrue(ai.compareAndSet(two,m4));
68 assertFalse(ai.compareAndSet(m5,seven));
70 assertTrue(ai.compareAndSet(m4,seven));
75 * compareAndSet in one thread enables another waiting for value
82 while (!ai.compareAndSet(two, three))
87 assertTrue(ai.compareAndSet(one, two));
AtomicIntegerArrayTest.java 111 * compareAndSet succeeds in changing value if equal to expected else fails
117 assertTrue(ai.compareAndSet(i, 1,2));
118 assertTrue(ai.compareAndSet(i, 2,-4));
120 assertFalse(ai.compareAndSet(i, -5,7));
122 assertTrue(ai.compareAndSet(i, -4,7));
128 * compareAndSet in one thread enables another waiting for value
136 while (!a.compareAndSet(0, 2, 3))
141 assertTrue(a.compareAndSet(0, 1, 2));
279 if (ai.compareAndSet(i, v, v-1))
AtomicLongArrayTest.java 110 * compareAndSet succeeds in changing value if equal to expected else fails
116 assertTrue(ai.compareAndSet(i, 1,2));
117 assertTrue(ai.compareAndSet(i, 2,-4));
119 assertFalse(ai.compareAndSet(i, -5,7));
121 assertTrue(ai.compareAndSet(i, -4,7));
127 * compareAndSet in one thread enables another waiting for value
135 while (!a.compareAndSet(0, 2, 3))
140 assertTrue(a.compareAndSet(0, 1, 2));
278 if (ai.compareAndSet(i, v, v-1))
  /libcore/luni/src/main/java/java/util/concurrent/
Exchanger.java 251 * hole. So get() returns hole, and compareAndSet CAS'es value
294 * are performed only via compareAndSet, to avoid stale values
321 slot.compareAndSet(y, null)) {
323 if (you.compareAndSet(null, item)) {
329 slot.compareAndSet(null, me)) {
338 max.compareAndSet(m, m - 1); // Maybe shrink table
342 if (fails > 3 && m < FULL && max.compareAndSet(m, m + 1))
414 if (!node.compareAndSet(null, CANCEL))
417 slot.compareAndSet(node, null);
538 if (slot.compareAndSet(y, null))
    [all...]
SynchronousQueue.java 226 nextUpdater.compareAndSet(this, cmp, val));
243 matchUpdater.compareAndSet(this, null, s)) {
258 matchUpdater.compareAndSet(this, null, this);
274 return h == head && headUpdater.compareAndSet(this, h, nh);
509 nextUpdater.compareAndSet(this, cmp, val));
518 itemUpdater.compareAndSet(this, cmp, val));
525 itemUpdater.compareAndSet(this, cmp, this);
568 if (h == head && headUpdater.compareAndSet(this, h, nh))
581 tailUpdater.compareAndSet(this, t, nt);
593 cleanMeUpdater.compareAndSet(this, cmp, val))
    [all...]
  /prebuilt/sdk/10/
android.jar 

Completed in 163 milliseconds

1 2