From 1a9fc609ee2d059b4cc195f466cf80cd78f35b99 Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Tue, 5 Nov 2024 10:48:30 +0100 Subject: [PATCH] src_lockfree package has been removed. --- bench/bench_bounded_stack.ml | 2 +- bench/main.ml | 2 +- src/bounded_stack.mli | 10 +++++----- src/dune | 3 +-- test/bounded_stack/dune | 10 +++++----- test/bounded_stack/stm_bounded_stack.ml | 4 ++-- test/skiplist/stm_skiplist.ml | 2 +- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/bench/bench_bounded_stack.ml b/bench/bench_bounded_stack.ml index 8e8ee045..2dc2b495 100644 --- a/bench/bench_bounded_stack.ml +++ b/bench/bench_bounded_stack.ml @@ -1,5 +1,5 @@ open Multicore_bench -module Stack = Saturn_lockfree.Bounded_stack +module Stack = Saturn.Bounded_stack let run_one_domain ~budgetf ?(n_msgs = 50 * Util.iter_factor) () = let t = Stack.create () in diff --git a/bench/main.ml b/bench/main.ml index 43e6df78..1c9fefb8 100644 --- a/bench/main.ml +++ b/bench/main.ml @@ -7,7 +7,7 @@ let benchmarks = ("Saturn Htbl", Bench_htbl.run_suite); ("Saturn Stack", Bench_stack.run_suite); ("Saturn Work_stealing_deque", Bench_ws_deque.run_suite); - ("Saturn_lockfree Bounded_Stack", Bench_bounded_stack.run_suite); + ("Saturn Bounded_Stack", Bench_bounded_stack.run_suite); ] let () = Multicore_bench.Cmd.run ~benchmarks () diff --git a/src/bounded_stack.mli b/src/bounded_stack.mli index a6b3823e..405f0420 100644 --- a/src/bounded_stack.mli +++ b/src/bounded_stack.mli @@ -3,7 +3,7 @@ This module implements a lock-free bounded stack based on Treiber's stack algorithm. Adding a capacity to this algorithm adds a general overhead to the operations, and thus, it is recommended to use the unbounded stack - {!Saturn_lockfree.Stack} if neither the capacity nor the {!length} function + {!Saturn.Stack} if neither the capacity nor the {!length} function is needed. *) @@ -77,7 +77,7 @@ val pop_all : 'a t -> 'a list order. {[ - # open Saturn_lockfree.Bounded_stack + # open Saturn.Bounded_stack # let t : int t = create () val t : int t = # try_push t 1 @@ -176,7 +176,7 @@ the [seq] is too long to fit in the stack. *) (** {1 Examples} An example top-level session: {[ - # open Saturn_lockfree.Bounded_stack + # open Saturn.Bounded_stack # let t : int t = create () val t : int t = # try_push t 42 @@ -192,11 +192,11 @@ the [seq] is too long to fit in the stack. *) # pop_opt t - : int option = None # pop_exn t - Exception: Saturn_lockfree__Bounded_stack.Empty.]} + Exception: Saturn__Bounded_stack.Empty.]} A multicore example: {@ocaml non-deterministic[ - # open Saturn_lockfree.Bounded_stack + # open Saturn.Bounded_stack # let t :int t = create () val t : int t = # let barrier = Atomic.make 2 diff --git a/src/dune b/src/dune index a39fe468..ed93fb61 100644 --- a/src/dune +++ b/src/dune @@ -36,11 +36,10 @@ let () = (copy atomic.without_contended.ml atomic.ml))) (mdx - (package saturn_lockfree) + (package saturn) (enabled_if (and (<> %{os_type} Win32) (>= %{ocaml_version} 5.0.0))) - (libraries saturn_lockfree) (files bounded_stack.mli)) |} diff --git a/test/bounded_stack/dune b/test/bounded_stack/dune index 52434a9c..6e291ec1 100644 --- a/test/bounded_stack/dune +++ b/test/bounded_stack/dune @@ -1,10 +1,10 @@ (rule (action - (copy ../../src_lockfree/bounded_stack.ml bounded_stack.ml)) - (package saturn_lockfree)) + (copy ../../src/bounded_stack.ml bounded_stack.ml)) + (package saturn)) (test - (package saturn_lockfree) + (package saturn) (name bounded_stack_dscheck) (libraries atomic dscheck alcotest backoff multicore-magic) (build_if @@ -17,7 +17,7 @@ (modules bounded_stack bounded_stack_dscheck)) (test - (package saturn_lockfree) + (package saturn) (name stm_bounded_stack) (modules stm_bounded_stack) - (libraries saturn_lockfree qcheck-core qcheck-stm.stm stm_run)) + (libraries saturn qcheck-core qcheck-stm.stm stm_run)) diff --git a/test/bounded_stack/stm_bounded_stack.ml b/test/bounded_stack/stm_bounded_stack.ml index 15557215..18b39c97 100644 --- a/test/bounded_stack/stm_bounded_stack.ml +++ b/test/bounded_stack/stm_bounded_stack.ml @@ -2,7 +2,7 @@ open QCheck open STM -module Stack = Saturn_lockfree.Bounded_stack +module Stack = Saturn.Bounded_stack module Spec = struct type cmd = @@ -124,4 +124,4 @@ module Spec = struct | _, _ -> false end -let () = Stm_run.run ~name:"Saturn_lockfree.Bounded_stack" (module Spec) |> exit +let () = Stm_run.run ~name:"Saturn.Bounded_stack" (module Spec) |> exit diff --git a/test/skiplist/stm_skiplist.ml b/test/skiplist/stm_skiplist.ml index 0ada005b..1cfeba4a 100644 --- a/test/skiplist/stm_skiplist.ml +++ b/test/skiplist/stm_skiplist.ml @@ -64,4 +64,4 @@ module Spec = struct | _, _ -> false end -let () = Stm_run.run ~name:"Lockfree.Skiplist" (module Spec) |> exit +let () = Stm_run.run ~name:"Saturn.Skiplist" (module Spec) |> exit