Kcas.W1val ref : 'a -> 'a refCreate a new reference.
val get : 'a ref -> 'aGet the value of the reference.
val set : 'a ref -> 'a -> unitval cas : 'a ref -> 'a -> 'a -> boolcas r e u updates the reference r to value u if the current content of r is e.
val try_map : 'a ref -> ('a -> 'a option) -> 'a cas_resulttry_map r f invokes f c, where c is the result of get r. If the result of f c is None, then Aborted is returned. If the result of f c is Some v, then attempt to CAS update r from c to v. If the CAS succeeds, then Success c is returned. If the CAS fails, then Failed is returned.
val map : 'a ref -> ('a -> 'a option) -> 'a cas_resultLike try_map but retries on CAS failure. Hence, map r f never returns Failed.
val incr : int ref -> unitincr r atomically increments r
val decr : int ref -> unit