Skip to content

Commit

Permalink
src_lockfree package has been removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrm committed Nov 5, 2024
1 parent 75f5687 commit 1a9fc60
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bench/bench_bounded_stack.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion bench/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
10 changes: 5 additions & 5 deletions src/bounded_stack.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*)

Expand Down Expand Up @@ -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 = <abstr>
# try_push t 1
Expand Down Expand Up @@ -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 = <abstr>
# try_push t 42
Expand All @@ -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 = <abstr>
# let barrier = Atomic.make 2
Expand Down
3 changes: 1 addition & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -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))
|}
10 changes: 5 additions & 5 deletions test/bounded_stack/dune
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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))
4 changes: 2 additions & 2 deletions test/bounded_stack/stm_bounded_stack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

open QCheck
open STM
module Stack = Saturn_lockfree.Bounded_stack
module Stack = Saturn.Bounded_stack

module Spec = struct
type cmd =
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion test/skiplist/stm_skiplist.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1a9fc60

Please sign in to comment.