\begin{slide}{Compare-and-Set (Benutzung)}
\begin{verbatim}
AtomicInteger p;

boolean ok;
do { 
  int v = p.get();
  ok = p.compareAndSet(v,v+1);
} while ( ! ok);
\end{verbatim}



\end{slide}
