package vchan

  1. Overview
  2. Docs
type offset =
  1. | First
  2. | Second
    (*

    Valid offsets within the shared page

    *)
val to_offset : offset -> int

to_offset x converts x to bytes

type t =
  1. | Within_shared_page of offset
    (*

    within the shared page

    *)
  2. | External of int
    (*

    in separately granted pages

    *)

Location of a data ring

val to_length : t -> int

to_length t gives the maximum number of available bytes at t

val to_order : t -> int

to_order t gives the 'order' which is shared via the metadata page and used to uniquely identify the location

val of_order : int -> (t, [> `Msg of string ]) result

of_order x parses the order

val of_lengths : int -> int -> t * t

of_lengths read_size write_size chooses distinct t1,t2 to accommodate buffers of size read_size and write_size

OCaml

Innovation. Community. Security.