remove domain stub entirely

This commit is contained in:
Simon Cruanes 2023-06-09 09:55:42 -04:00
parent 261874bfa8
commit 06b7bf28b7
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
4 changed files with 1 additions and 29 deletions

View file

@ -9,10 +9,3 @@
(action (action
(with-stdout-to %{targets} (with-stdout-to %{targets}
(run ./gen/gen.exe --ocaml %{ocaml_version} --atomic)))) (run ./gen/gen.exe --ocaml %{ocaml_version} --atomic))))
(rule
(targets domain_.ml)
(action
(with-stdout-to %{targets}
(run ./gen/gen.exe --ocaml %{ocaml_version} --domain))))

View file

@ -45,25 +45,14 @@ let atomic_post_412 = {|
include Atomic include Atomic
|} |}
let domain_pre_5 = {|
let relax () = Thread.yield ()
|}
let domain_post_5 = {|
let relax = Domain.cpu_relax
|}
let p_version s = Scanf.sscanf s "%d.%d" (fun x y -> x, y) let p_version s = Scanf.sscanf s "%d.%d" (fun x y -> x, y)
let () = let () =
let atomic = ref false in let atomic = ref false in
let domain = ref false in
let ocaml = ref Sys.ocaml_version in let ocaml = ref Sys.ocaml_version in
Arg.parse Arg.parse
[ [
"--atomic", Arg.Set atomic, " atomic"; "--atomic", Arg.Set atomic, " atomic";
"--domain", Arg.Set domain, " domain";
"--ocaml", Arg.Set_string ocaml, " set ocaml version"; "--ocaml", Arg.Set_string ocaml, " set ocaml version";
] ]
ignore ""; ignore "";
@ -78,12 +67,4 @@ let () =
atomic_post_412 atomic_post_412
in in
print_endline code print_endline code
) else if !domain then (
let code =
if (major, minor) < (5, 0) then
domain_pre_5
else
domain_post_5
in
print_endline code
) )

View file

@ -1,5 +1,3 @@
open Trace
val collector : val collector :
out:[ `File of string | `Stderr | `Stdout ] -> unit -> Trace.collector out:[ `File of string | `Stderr | `Stdout ] -> unit -> Trace.collector
(** Make a collector that writes into the given output. (** Make a collector that writes into the given output.

View file

@ -83,7 +83,7 @@ let setup_collector c : unit =
| Some _ -> invalid_arg "trace: collector already present" | Some _ -> invalid_arg "trace: collector already present"
| None -> not (A.compare_and_set collector cur (Some c)) | None -> not (A.compare_and_set collector cur (Some c))
do do
Domain_.relax () ()
done done
let shutdown () = let shutdown () =