mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
compat < 5.0
This commit is contained in:
parent
67bc11b4d3
commit
0e198c8059
4 changed files with 7 additions and 2 deletions
|
|
@ -3,4 +3,7 @@
|
|||
(name trace_tef)
|
||||
(public_name trace-tef)
|
||||
(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))))
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ module Backoff = struct
|
|||
let once (b : t) : t =
|
||||
let actual_b = b + Random.int 4 in
|
||||
for _i = 1 to actual_b do
|
||||
Domain.cpu_relax ()
|
||||
Relax_.cpu_relax ()
|
||||
done;
|
||||
min (b * 2) 256
|
||||
end
|
||||
|
|
|
|||
1
src/tef/relax_.dummy.ml
Normal file
1
src/tef/relax_.dummy.ml
Normal file
|
|
@ -0,0 +1 @@
|
|||
let cpu_relax () = ()
|
||||
1
src/tef/relax_.real.ml
Normal file
1
src/tef/relax_.real.ml
Normal file
|
|
@ -0,0 +1 @@
|
|||
let cpu_relax = Domain.cpu_relax
|
||||
Loading…
Add table
Reference in a new issue