From 12a77c78d1afaeee28353b1326c8e20c885f3313 Mon Sep 17 00:00:00 2001 From: Vesa Karvonen Date: Thu, 4 Jan 2024 18:27:35 +0200 Subject: [PATCH] Move `Cue` under `Saturn_lockfree` --- dune-project | 3 +-- saturn.opam | 2 -- saturn_lockfree.opam | 1 + src/dune | 4 +--- src/saturn.ml | 2 +- src/saturn.mli | 2 +- {src => src_lockfree}/cue.ml | 0 {src => src_lockfree}/cue.mli | 0 src_lockfree/dune | 2 +- src_lockfree/saturn_lockfree.ml | 1 + src_lockfree/saturn_lockfree.mli | 1 + test/cue/dune | 1 + 12 files changed, 9 insertions(+), 10 deletions(-) rename {src => src_lockfree}/cue.ml (100%) rename {src => src_lockfree}/cue.mli (100%) diff --git a/dune-project b/dune-project index cbeff8e3..41e1c77e 100644 --- a/dune-project +++ b/dune-project @@ -13,8 +13,6 @@ (depends (ocaml (>= 4.13)) (domain_shims (and (>= 0.1.0) :with-test)) - (domain-local-await (>= 1.0.0)) - (backoff (>= 0.1.0)) (saturn_lockfree (= :version)) (multicore-magic (and (>= 2.1.0) :with-test)) (alcotest (and (>= 1.7.0) :with-test)) @@ -28,6 +26,7 @@ (synopsis "Collection of lock-free data structures for Multicore OCaml") (depends (ocaml (>= 4.13)) + (domain-local-await (>= 1.0.0)) (domain_shims (and (>= 0.1.0) :with-test)) (backoff (>= 0.1.0)) (multicore-magic (>= 2.1.0)) diff --git a/saturn.opam b/saturn.opam index 10f975a8..84408978 100644 --- a/saturn.opam +++ b/saturn.opam @@ -12,8 +12,6 @@ depends: [ "dune" {>= "3.2"} "ocaml" {>= "4.13"} "domain_shims" {>= "0.1.0" & with-test} - "domain-local-await" {>= "1.0.0"} - "backoff" {>= "0.1.0"} "saturn_lockfree" {= version} "multicore-magic" {>= "2.1.0" & with-test} "alcotest" {>= "1.7.0" & with-test} diff --git a/saturn_lockfree.opam b/saturn_lockfree.opam index d2ca4ba9..b0391b71 100644 --- a/saturn_lockfree.opam +++ b/saturn_lockfree.opam @@ -10,6 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/saturn/issues" depends: [ "dune" {>= "3.2"} "ocaml" {>= "4.13"} + "domain-local-await" {>= "1.0.0"} "domain_shims" {>= "0.1.0" & with-test} "backoff" {>= "0.1.0"} "multicore-magic" {>= "2.1.0"} diff --git a/src/dune b/src/dune index 142f374f..f09afce0 100644 --- a/src/dune +++ b/src/dune @@ -2,6 +2,4 @@ (name saturn) (public_name saturn) (libraries - (re_export saturn_lockfree) - domain-local-await - backoff)) + (re_export saturn_lockfree))) diff --git a/src/saturn.ml b/src/saturn.ml index 2bbded45..87b3e9a0 100644 --- a/src/saturn.ml +++ b/src/saturn.ml @@ -26,7 +26,7 @@ Copyright (c) 2017, Nicolas ASSOUAD ######## *) -module Cue = Cue +module Cue = Saturn_lockfree.Cue module Queue = Saturn_lockfree.Queue module Stack = Saturn_lockfree.Stack module Work_stealing_deque = Saturn_lockfree.Work_stealing_deque diff --git a/src/saturn.mli b/src/saturn.mli index bc6ff1da..e3c59b89 100644 --- a/src/saturn.mli +++ b/src/saturn.mli @@ -30,7 +30,7 @@ Copyright (c) 2017, Nicolas ASSOUAD (** {1 Data structures} *) -module Cue = Cue +module Cue = Saturn_lockfree.Cue module Queue = Saturn_lockfree.Queue module Stack = Saturn_lockfree.Stack module Work_stealing_deque = Saturn_lockfree.Work_stealing_deque diff --git a/src/cue.ml b/src_lockfree/cue.ml similarity index 100% rename from src/cue.ml rename to src_lockfree/cue.ml diff --git a/src/cue.mli b/src_lockfree/cue.mli similarity index 100% rename from src/cue.mli rename to src_lockfree/cue.mli diff --git a/src_lockfree/dune b/src_lockfree/dune index dbfaff3b..76f0f18f 100644 --- a/src_lockfree/dune +++ b/src_lockfree/dune @@ -10,7 +10,7 @@ let () = (library (name saturn_lockfree) (public_name saturn_lockfree) - (libraries backoff multicore-magic |} + (libraries backoff multicore-magic domain-local-await |} ^ maybe_threads ^ {| )) diff --git a/src_lockfree/saturn_lockfree.ml b/src_lockfree/saturn_lockfree.ml index 9bd337c9..0ecf1c2a 100644 --- a/src_lockfree/saturn_lockfree.ml +++ b/src_lockfree/saturn_lockfree.ml @@ -26,6 +26,7 @@ Copyright (c) 2017, Nicolas ASSOUAD ######## *) +module Cue = Cue module Queue = Michael_scott_queue module Stack = Treiber_stack module Work_stealing_deque = Ws_deque diff --git a/src_lockfree/saturn_lockfree.mli b/src_lockfree/saturn_lockfree.mli index 5662b6b4..0d5e8f46 100644 --- a/src_lockfree/saturn_lockfree.mli +++ b/src_lockfree/saturn_lockfree.mli @@ -30,6 +30,7 @@ Copyright (c) 2017, Nicolas ASSOUAD (** {1 Data structures} *) +module Cue = Cue module Queue = Michael_scott_queue module Stack = Treiber_stack module Work_stealing_deque = Ws_deque diff --git a/test/cue/dune b/test/cue/dune index c371c526..dd7221bd 100644 --- a/test/cue/dune +++ b/test/cue/dune @@ -1,4 +1,5 @@ (test + (package saturn_lockfree) (name stm_cue) (modules stm_cue) (libraries