/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicLong.java | 104 long current = get(); in getAndSet() local 105 if (compareAndSet(current, newValue)) in getAndSet() 106 return current; in getAndSet() 146 long current = get(); in getAndIncrement() local 147 long next = current + 1; in getAndIncrement() 148 if (compareAndSet(current, next)) in getAndIncrement() 149 return current; in getAndIncrement() 160 long current = get(); in getAndDecrement() local 161 long next = current - 1; in getAndDecrement() 162 if (compareAndSet(current, next)) in getAndDecrement() [all …]
|
D | AtomicInteger.java | 90 int current = get(); in getAndSet() local 91 if (compareAndSet(current, newValue)) in getAndSet() 92 return current; in getAndSet() 132 int current = get(); in getAndIncrement() local 133 int next = current + 1; in getAndIncrement() 134 if (compareAndSet(current, next)) in getAndIncrement() 135 return current; in getAndIncrement() 146 int current = get(); in getAndDecrement() local 147 int next = current - 1; in getAndDecrement() 148 if (compareAndSet(current, next)) in getAndDecrement() [all …]
|
D | AtomicIntegerFieldUpdater.java | 133 int current = get(obj); in getAndSet() local 134 if (compareAndSet(obj, current, newValue)) in getAndSet() 135 return current; in getAndSet() 148 int current = get(obj); in getAndIncrement() local 149 int next = current + 1; in getAndIncrement() 150 if (compareAndSet(obj, current, next)) in getAndIncrement() 151 return current; in getAndIncrement() 164 int current = get(obj); in getAndDecrement() local 165 int next = current - 1; in getAndDecrement() 166 if (compareAndSet(obj, current, next)) in getAndDecrement() [all …]
|
D | AtomicStampedReference.java | 120 Pair<V> current = pair; in compareAndSet() local 122 expectedReference == current.reference && in compareAndSet() 123 expectedStamp == current.stamp && in compareAndSet() 124 ((newReference == current.reference && in compareAndSet() 125 newStamp == current.stamp) || in compareAndSet() 126 casPair(current, Pair.of(newReference, newStamp))); in compareAndSet() 136 Pair<V> current = pair; in set() local 137 if (newReference != current.reference || newStamp != current.stamp) in set() 155 Pair<V> current = pair; in attemptStamp() local 157 expectedReference == current.reference && in attemptStamp() [all …]
|
D | AtomicMarkableReference.java | 120 Pair<V> current = pair; in compareAndSet() local 122 expectedReference == current.reference && in compareAndSet() 123 expectedMark == current.mark && in compareAndSet() 124 ((newReference == current.reference && in compareAndSet() 125 newMark == current.mark) || in compareAndSet() 126 casPair(current, Pair.of(newReference, newMark))); in compareAndSet() 136 Pair<V> current = pair; in set() local 137 if (newReference != current.reference || newMark != current.mark) in set() 155 Pair<V> current = pair; in attemptMark() local 157 expectedReference == current.reference && in attemptMark() [all …]
|
D | AtomicLongFieldUpdater.java | 136 long current = get(obj); in getAndSet() local 137 if (compareAndSet(obj, current, newValue)) in getAndSet() 138 return current; in getAndSet() 151 long current = get(obj); in getAndIncrement() local 152 long next = current + 1; in getAndIncrement() 153 if (compareAndSet(obj, current, next)) in getAndIncrement() 154 return current; in getAndIncrement() 167 long current = get(obj); in getAndDecrement() local 168 long next = current - 1; in getAndDecrement() 169 if (compareAndSet(obj, current, next)) in getAndDecrement() [all …]
|
D | AtomicLongArray.java | 120 long current = getRaw(offset); in getAndSet() local 121 if (compareAndSetRaw(offset, current, newValue)) in getAndSet() 122 return current; in getAndSet() 191 long current = getRaw(offset); in getAndAdd() local 192 if (compareAndSetRaw(offset, current, current + delta)) in getAndAdd() 193 return current; in getAndAdd() 227 long current = getRaw(offset); in addAndGet() local 228 long next = current + delta; in addAndGet() 229 if (compareAndSetRaw(offset, current, next)) in addAndGet()
|
D | AtomicIntegerArray.java | 121 int current = getRaw(offset); in getAndSet() local 122 if (compareAndSetRaw(offset, current, newValue)) in getAndSet() 123 return current; in getAndSet() 192 int current = getRaw(offset); in getAndAdd() local 193 if (compareAndSetRaw(offset, current, current + delta)) in getAndAdd() 194 return current; in getAndAdd() 228 int current = getRaw(offset); in addAndGet() local 229 int next = current + delta; in addAndGet() 230 if (compareAndSetRaw(offset, current, next)) in addAndGet()
|
D | AtomicBoolean.java | 121 boolean current = get(); in getAndSet() 122 if (compareAndSet(current, newValue)) in getAndSet() 123 return current; in getAndSet()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandomTest.java | 40 ThreadLocalRandom.current().setSeed(17); in testSetSeed() 49 int f = ThreadLocalRandom.current().nextInt(); in testNextInt() 51 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) in testNextInt() 60 long f = ThreadLocalRandom.current().nextLong(); 62 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f) 71 boolean f = ThreadLocalRandom.current().nextBoolean(); 73 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f) 82 float f = ThreadLocalRandom.current().nextFloat(); 84 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f) 93 double f = ThreadLocalRandom.current().nextDouble(); [all …]
|
D | ThreadTest.java | 28 Thread current = Thread.currentThread(); in testGetAndSetUncaughtExceptionHandler() local 29 ThreadGroup tg = current.getThreadGroup(); in testGetAndSetUncaughtExceptionHandler() 31 assertEquals(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 32 current.setUncaughtExceptionHandler(eh); in testGetAndSetUncaughtExceptionHandler() 33 assertEquals(eh, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 34 current.setUncaughtExceptionHandler(null); in testGetAndSetUncaughtExceptionHandler() 35 assertEquals(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 51 Thread current = Thread.currentThread(); in testGetAndSetDefaultUncaughtExceptionHandler() local 52 ThreadGroup tg = current.getThreadGroup(); in testGetAndSetDefaultUncaughtExceptionHandler()
|
D | ExecutorsTest.java | 291 Thread current = Thread.currentThread(); in testDefaultThreadFactory() 292 assertTrue(!current.isDaemon()); in testDefaultThreadFactory() 293 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY); in testDefaultThreadFactory() 294 ThreadGroup g = current.getThreadGroup(); in testDefaultThreadFactory() 300 String name = current.getName(); in testDefaultThreadFactory() 334 Thread current = Thread.currentThread(); in testPrivilegedThreadFactory() 335 assertTrue(!current.isDaemon()); in testPrivilegedThreadFactory() 336 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY); in testPrivilegedThreadFactory() 337 ThreadGroup g = current.getThreadGroup(); in testPrivilegedThreadFactory() 343 String name = current.getName(); in testPrivilegedThreadFactory() [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldDateFormatTest.java | 91 Date current = new Date(); in test_formatLjava_util_Date() local 92 String dtf = format.format(current); in test_formatLjava_util_Date() 94 assertTrue("Incorrect date format", sdf.format(current).equals(dtf)); in test_formatLjava_util_Date() 109 Date current = new Date(); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() local 112 StringBuffer sb = format.format(current, toAppend, fp); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 114 assertTrue("Incorrect date format", sdf.format(current).equals( in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 216 Date current = new Date(); in test_parseLString() local 219 Date date = format.parse(format.format(current).toString()); in test_parseLString() 220 assertEquals(current.getDate(), date.getDate()); in test_parseLString() 221 assertEquals(current.getDay(), date.getDay()); in test_parseLString() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | Semaphore.java | 160 int current = getState(); in tryReleaseShared() local 161 int next = current + releases; in tryReleaseShared() 162 if (next < current) // overflow in tryReleaseShared() 164 if (compareAndSetState(current, next)) in tryReleaseShared() 171 int current = getState(); in reducePermits() local 172 int next = current - reductions; in reducePermits() 173 if (next > current) // underflow in reducePermits() 175 if (compareAndSetState(current, next)) in reducePermits() 182 int current = getState(); in drainPermits() local 183 if (current == 0 || compareAndSetState(current, 0)) in drainPermits() [all …]
|
D | LinkedBlockingQueue.java | 757 private Node<E> current; field in LinkedBlockingQueue.Itr 764 current = head.next; in Itr() 765 if (current != null) in Itr() 766 currentElement = current.item; in Itr() 773 return current != null; in hasNext() 797 if (current == null) in next() 800 lastRet = current; in next() 801 current = nextNode(current); in next() 802 currentElement = (current == null) ? null : current.item; in next()
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | ReentrantReadWriteLock.java | 364 Thread current = Thread.currentThread(); in tryAcquire() local 369 if (w == 0 || current != getExclusiveOwnerThread()) in tryAcquire() 380 setExclusiveOwnerThread(current); in tryAcquire() 385 Thread current = Thread.currentThread(); in tryReleaseShared() local 386 if (firstReader == current) { in tryReleaseShared() 394 if (rh == null || rh.tid != current.getId()) in tryReleaseShared() 436 Thread current = Thread.currentThread(); in tryAcquireShared() local 439 getExclusiveOwnerThread() != current) in tryAcquireShared() 446 firstReader = current; in tryAcquireShared() 448 } else if (firstReader == current) { in tryAcquireShared() [all …]
|
D | ReentrantLock.java | 101 final Thread current = Thread.currentThread(); in nonfairTryAcquire() local 105 setExclusiveOwnerThread(current); in nonfairTryAcquire() 109 else if (current == getExclusiveOwnerThread()) { in nonfairTryAcquire() 203 final Thread current = Thread.currentThread(); in tryAcquire() local 208 setExclusiveOwnerThread(current); in tryAcquire() 212 else if (current == getExclusiveOwnerThread()) { in tryAcquire()
|
/libcore/luni/src/main/java/java/lang/ |
D | InheritableThreadLocal.java | 54 Values values(Thread current) { in values() argument 55 return current.inheritableValues; in values() 59 Values initializeValues(Thread current) { in initializeValues() argument 60 return current.inheritableValues = new Values(); in initializeValues()
|
/libcore/luni/src/main/java/java/sql/ |
D | SQLException.java | 237 private SQLException current; field in SQLException.InternalIterator 240 current = e; in InternalIterator() 244 return current != null; in hasNext() 248 if (current == null) { in next() 251 SQLException ret = current; in next() 252 current = current.next; in next()
|
/libcore/luni/src/main/java/java/util/ |
D | Timer.java | 93 int current = size - 1; in upHeap() local 94 int parent = (current - 1) / 2; in upHeap() 96 while (timers[current].when < timers[parent].when) { in upHeap() 98 TimerTask tmp = timers[current]; in upHeap() 99 timers[current] = timers[parent]; in upHeap() 103 current = parent; in upHeap() 104 parent = (current - 1) / 2; in upHeap() 109 int current = pos; in downHeap() local 110 int child = 2 * current + 1; in downHeap() 120 if (timers[current].when < timers[child].when) { in downHeap() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ThreadGroupTest.java | 282 ThreadGroup current = testRoot; in test_getParent() local 289 current = new ThreadGroup(current, "level " + i); in test_getParent() 290 groups.addElement(current); in test_getParent() 295 current = groups.elementAt(i); in test_getParent() 297 assertTrue("Parent is wrong", current.getParent() == previous); in test_getParent() 434 ThreadGroup current = testRoot; in test_setMaxPriorityI() local 436 current = new ThreadGroup(current, "level " + i); in test_setMaxPriorityI() 442 current = testRoot; in test_setMaxPriorityI() 448 current.setMaxPriority(current.getParent().getMaxPriority() - 1); in test_setMaxPriorityI() 451 maxPrio = current.getMaxPriority(); in test_setMaxPriorityI() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | AttributedCharacterIteratorTest.java | 33 assertEquals("Wrong first", 'T', it.current()); in test_current() 35 assertEquals("Wrong second", 'e', it.current()); in test_current() 38 assertEquals("Wrong last", 'g', it.current()); in test_current() 40 assertTrue("Wrong final", it.current() == CharacterIterator.DONE); in test_current() 43 assertEquals("Wrong first2", 's', it.current()); in test_current() 151 assertEquals("Wrong first", '2', it.current()); in test_setIndexI()
|
D | StringCharacterIteratorTest.java | 166 assertEquals('f', fixture.current()); in test_current() 168 assertEquals('i', fixture.current()); in test_current() 172 assertEquals("Wrong current char", 'i', it.current()); in test_current() 300 it1.current() == CharacterIterator.DONE); in test_next() 345 assertEquals("Wrong current char", 's', it1.current()); in test_previous() 359 assertEquals('f', fixture.current()); in test_setIndex() 361 assertEquals('e', fixture.current()); in test_setIndex() 383 assertEquals('f', fixture.current()); in test_setText() 411 assertEquals("Wrong current char", 't', it.current()); in test_ConstructorLjava_lang_String() 424 assertEquals("Wrong current char", 't', it.current()); in test_ConstructorLjava_lang_StringI() [all …]
|
/libcore/luni/src/main/java/java/text/ |
D | RuleBasedBreakIterator.java | 34 @Override public int current() { in current() method in RuleBasedBreakIterator 35 return wrapped.current(); in current() 82 newText.current(); in setText()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | IdentityScope2Test.java | 77 Identity current = (Identity) en.nextElement(); in getIdentity() local 78 if (current.getName().equals(name)) in getIdentity() 79 return current; in getIdentity() 87 Identity current = (Identity) en.nextElement(); in getIdentity() local 88 if (current.getPublicKey() == pk) in getIdentity() 89 return current; in getIdentity()
|