CCAtomicval make : 'a -> 'a tval get : 'a t -> 'aval set : 'a t -> 'a -> unitval exchange : 'a t -> 'a -> 'aval compare_and_set : 'a t -> 'a -> 'a -> boolval fetch_and_add : int t -> int -> intval incr : int t -> unitval decr : int t -> unitval update_cas : 'a t -> ('a -> 'res * 'a) -> 'resUpdate loop with a compare-and-swap, and some basic backoff behavior. update_cas atomic f is, in essence, let res, x = f !atomic in atomic := x; res done atomically. f might be called multiple times and must be as cheap as possible.