package ocaml_intrinsics

  1. Overview
  2. Docs

Module Ocaml_intrinsics.AtomicSource

Atomic arithmetic operations

Sourcemodule Expert = Atomic_expert
Sourcemodule 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.

Sourcemodule 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.

Sourcemodule 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.