vchan

Xen Vchan implementation
IN THIS PACKAGE
Module Vchan . Location
type offset =
| First
| Second

Valid offsets within the shared page

val sexp_of_offset : offset -> Sexplib0.Sexp.t
val offset_of_sexp : Sexplib0.Sexp.t -> offset
val to_offset : offset -> int

to_offset x converts x to bytes

type t =
| Within_shared_page of offset(*

within the shared page

*)
| External of int(*

in separately granted pages

*)

Location of a data ring

include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
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