Skip to content

Commit

Permalink
Use fenceless_get and fenceless_set where it safe to do so.
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Apr 28, 2023
1 parent 16414df commit 950f7ec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/kcas.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
* Copyright (c) 2023, Vesa Karvonen <vesa.a.j.k@gmail.com>
*)

(*
(* NOTE: You can adjust comment blocks below to select whether or not to use
fenceless operations where it is safe to do so. Fenceless operations have
been seen to provide significant performance improvements on ARM (Apple
M1). *)

(**)
external fenceless_get : 'a Atomic.t -> 'a = "%field0"
external fenceless_set : 'a Atomic.t -> 'a -> unit = "%setfield0"
*)
(**)
(*
let fenceless_get = Atomic.get
let fenceless_set = Atomic.set
(**)
*)

module Backoff = Backoff
module Domain_local_await = Domain_local_await
Expand Down

0 comments on commit 950f7ec

Please sign in to comment.