Exemplo n.º 1
0
 /** CASes the busy field from 0 to 1 to acquire lock. */
 final boolean casBusy() {
   return UNSAFE.compareAndSwapInt(this, busyOffset, 0, 1);
 }
Exemplo n.º 2
0
 private boolean casSweepVotes(int cmp, int val) {
   return UNSAFE.compareAndSwapInt(this, sweepVotesOffset, cmp, val);
 }