Source file semaphore_intf.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module type COUNTING = sig
type t
val make : int -> t
val release : t -> unit
val acquire : t -> unit
val try_acquire : t -> bool
val get_value : t -> int
end
module type BINARY = sig
type t
val make : bool -> t
val release : t -> unit
val acquire : t -> unit
val try_acquire : t -> bool
end
module type S = sig
module Counting : COUNTING
module Binary : BINARY
end