compat < 5.0

This commit is contained in:
Simon Cruanes 2023-11-08 14:33:26 -05:00
parent 67bc11b4d3
commit 0e198c8059
4 changed files with 7 additions and 2 deletions

View file

@ -3,4 +3,7 @@
(name trace_tef) (name trace_tef)
(public_name trace-tef) (public_name trace-tef)
(synopsis "Simple and lightweight tracing using TEF/Catapult format, in-process") (synopsis "Simple and lightweight tracing using TEF/Catapult format, in-process")
(libraries trace.core mtime mtime.clock.os atomic unix threads)) (libraries trace.core mtime mtime.clock.os atomic unix threads
(select relax_.ml from
(base-domain -> relax_.real.ml)
( -> relax_.dummy.ml))))

View file

@ -18,7 +18,7 @@ module Backoff = struct
let once (b : t) : t = let once (b : t) : t =
let actual_b = b + Random.int 4 in let actual_b = b + Random.int 4 in
for _i = 1 to actual_b do for _i = 1 to actual_b do
Domain.cpu_relax () Relax_.cpu_relax ()
done; done;
min (b * 2) 256 min (b * 2) 256
end end

1
src/tef/relax_.dummy.ml Normal file
View file

@ -0,0 +1 @@
let cpu_relax () = ()

1
src/tef/relax_.real.ml Normal file
View file

@ -0,0 +1 @@
let cpu_relax = Domain.cpu_relax