
\begin{slide}{Compare-and-Set (Implementierung)}

Modell der Implementierung:
\begin{verbatim}
class AtomicInteger {  private int value;
  synchronized int get () { return value; }
  synchronized boolean 
    compareAndSet (int expected, int update) {
      if (value == expected) {
        value = update ; return true;
      } else {
        return false; } } }
\end{verbatim}


\end{slide}

