package ocaml_intrinsics

  1. Overview
  2. Docs

Atomic arithmetic operations

module Expert = Atomic_expert
module Native_pointer : sig ... end

fetch_and_$op_$type ptr val atomically runs *( *$type )ptr $op val, stores the result at ptr, and returns the original value at ptr.

module Ext_pointer : sig ... end

fetch_and_$op_$type ptr val atomically runs *( *$type )ptr $op val, stores the result at ptr, and returns the original value at ptr.

module Bigstring : sig ... end

fetch_and_$op_$type ptr ~pos val atomically runs *( *$type )((ptr + pos) $op val, stores the result at ptr + pos, and returns the original value at ptr + pos.

OCaml

Innovation. Community. Security.