title: Which AtomicInteger methods are test-and-set, fetch-and-add and compare-and-swap (in terms of lock-free algorithms)?
body: <p>CAS (<em>compare-and-swap</em>) : <code>boolean compareAndSet(int expect, int update)</code></p>
  
  <p>FAA(<em>fetch-and-add</em>) : <code>int addAndGet(int delta)</code> ??? </p>
  
  <p>TAS (<em>test-and-set</em>) : ???</p>
  
  <p>In my understanding:</p>
  
  <p>CAS (<em>compare-and-swap</em>) "synchronizes" (w/o locks, on CPU instructions level) code like this:</p>
  
  <pre><code>if(a==b) {
    a++;  // or a = a + 7;
  }
  </code></pre>
  
  <p>FAA (<em>fetch-and-add</em>) : "synchronizes" (w/o locks, on CPU instructions level) code like this:</p>
  
  <pre><code>x = x + 7;
  </code></pre>
  
  <p>But I am not sure about what kind of code "test-and-set" related to.</p>