Skip to content

Make domainslib build/run with OCaml 5.00 after PR #704 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
default: https://github.com/ocaml/opam-repository.git
cache-prefix: ${{ steps.multicore_hash.outputs.commit }}

- run: opam install . --deps-only
- run: opam install . --deps-only --with-test

- run: opam exec -- make all

Expand Down
1 change: 1 addition & 0 deletions domainslib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ depends: [
"base-domains"
"ocamlfind" {build}
"dune" {build}
"mirage-clock-unix" {with-test}
]
depopts: []
build: [
Expand Down
2 changes: 1 addition & 1 deletion lib/multi_channel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ let rec recv_poll_repeated mchan dls repeats =
| Exit ->
if repeats = 1 then raise Exit
else begin
Domain.Sync.cpu_relax ();
Domain.cpu_relax ();
recv_poll_repeated mchan dls (repeats - 1)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/task.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let rec await pool promise =
| Task (t, p) -> do_task t p
| Quit -> raise TasksActive
with
| Exit -> Domain.Sync.cpu_relax ()
| Exit -> Domain.cpu_relax ()
end;
await pool promise
| Some (Ok v) -> v
Expand Down
2 changes: 1 addition & 1 deletion lib/ws_deque.ml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module M : S = struct
if Atomic.compare_and_set q.top t (t + 1) then
release out
else begin
Domain.Sync.cpu_relax ();
Domain.cpu_relax ();
steal q
end

Expand Down
2 changes: 1 addition & 1 deletion test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

(test
(name task_throughput)
(libraries domainslib)
(libraries domainslib mirage-clock-unix)
(modules task_throughput)
(modes native))

Expand Down
4 changes: 2 additions & 2 deletions test/task_throughput.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ let _ =

let hist = TimingHist.make 5 25 in
for _ = 1 to n_iterations do
let t0 = Domain.timer_ticks () in
let t0 = Mclock.elapsed_ns() in
T.parallel_for pool ~start:1 ~finish:n_tasks ~body:(fun _ -> ());
let t = Int64.sub (Domain.timer_ticks ()) t0 in
let t = Int64.sub (Mclock.elapsed_ns ()) t0 in
TimingHist.add_point hist (Int64.to_int t);
done;

Expand Down