  This file is part of c4f . 

    Copyright ( c ) 2018 - 2022 C4 Project 

    c4 t itself is licensed under the MIT License . See the LICENSE file in the 
    project root for more information . 

    Parts of c4 t are based on code from the Herdtools7 project 
    (  ) : see the LICENSE.herd file in the 
    project root for more information .

   Copyright (c) 2018-2022 C4 Project

   c4t itself is licensed under the MIT License. See the LICENSE file in the
   project root for more information.

   Parts of c4t are based on code from the Herdtools7 project
   () : see the LICENSE.herd file in the
   project root for more information. *)

(** FIR: atomic fences. *)

* { 1 Fence modes }

module Mode : sig
  (** Type of fence modes (thread, signal, etc.). *)
  type t =
    | Thread  (** 'atomic_thread_fence' *)
    | Signal  (** 'atomic_signal_fence' *)

  include C4f_utils.Enum_types.Extension_table with type t := t
end

(** {1 Fences themselves} *)

(** Opaque type of atomic fences. *)
type t [@@deriving sexp, compare, equal, quickcheck]

(** {2 Constructors} *)

val make : mode:Mode.t -> mo:Mem_order.t -> t
* [ make ~mode ~mo ] makes a fence with the given mode and memory order .

(** {2 Accessors} *)

val mode : t -> Mode.t
(** [mode fence] gets [fence]'s mode. *)

val mo : t -> Mem_order.t
(** [mo fence] gets [fence]'s memory order. *)

* { 2 Traversals }

(** Traverses over the memory order of an atomic fence. *)
module On_mem_orders :
  Travesty.Traversable_types.S0 with type t = t and type Elt.t = Mem_order.t

* FIR: atomic fences. 
* Type of fence modes (thread, signal, etc.). 
* 'atomic_thread_fence' 
* 'atomic_signal_fence' 
* {1 Fences themselves} 
* Opaque type of atomic fences. 
* {2 Constructors} 
* {2 Accessors} 
* [mode fence] gets [fence]'s mode. 
* [mo fence] gets [fence]'s memory order. 
* Traverses over the memory order of an atomic fence. 
  This file is part of c4f . 

    Copyright ( c ) 2018 - 2022 C4 Project 

    c4 t itself is licensed under the MIT License . See the LICENSE file in the 
    project root for more information . 

    Parts of c4 t are based on code from the Herdtools7 project 
    (  ) : see the LICENSE.herd file in the 
    project root for more information .

   Copyright (c) 2018-2022 C4 Project

   c4t itself is licensed under the MIT License. See the LICENSE file in the
   project root for more information.

   Parts of c4t are based on code from the Herdtools7 project
   () : see the LICENSE.herd file in the
   project root for more information. *)


* { 1 Fence modes }

module Mode : sig
  type t =

  include C4f_utils.Enum_types.Extension_table with type t := t
end


type t [@@deriving sexp, compare, equal, quickcheck]


val make : mode:Mode.t -> mo:Mem_order.t -> t
* [ make ~mode ~mo ] makes a fence with the given mode and memory order .


val mode : t -> Mode.t

val mo : t -> Mem_order.t

* { 2 Traversals }

module On_mem_orders :
  Travesty.Traversable_types.S0 with type t = t and type Elt.t = Mem_order.t
