diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-08-22 17:55:26 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-08-23 03:06:58 +0000 |
| commit | db968eccee931abc8ad00d74d152625a2ab3174e (patch) | |
| tree | 3d5018dd9e298cfc1fb14bf404cde3fce5953fca /lib/kernel/Runtime.ml | |
| parent | b242516fc820a0a1ab00e24151a5b978f9a6f4a3 (diff) | |
| download | RNT-db968eccee931abc8ad00d74d152625a2ab3174e.tar.gz RNT-db968eccee931abc8ad00d74d152625a2ab3174e.zip | |
Tidy up
Diffstat (limited to '')
| -rw-r--r-- | lib/kernel/Runtime.ml | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/kernel/Runtime.ml b/lib/kernel/Runtime.ml deleted file mode 100644 index aa69791..0000000 --- a/lib/kernel/Runtime.ml +++ /dev/null @@ -1,45 +0,0 @@ -module Error = struct - open Concepts.Condition - - let registry_conflict () = - condition "registry-object-update-conflict" "Failed to update the in-memory object registry" - empty -end - -module CAS : Backend.Managers.Object.RUNTIME_STRATEGY = struct - type 'a state = 'a Atomic.t - type 'a token = 'a - - let create = Atomic.make - - let acquire state = - let photograph = Atomic.get state in - photograph, photograph - - let publish state token next = - if Atomic.compare_and_set state token next then Ok () else Error (Error.registry_conflict ()) -end - -(* module MVCC : REGISTRY_STRATEGY = struct end *) -(* module RCU : REGISTRY_STRATEGY = struct end *) - -module Make (Strategy : Backend.Managers.Object.RUNTIME_STRATEGY) (Store : Abstract.Storage.STORAGE) = -struct - module Init = Initialization.Make (Store) - module Objects = Backend.Managers.Object.Make (Strategy) - - type t = {connection: Store.connection; objects: Objects.t} - - let initialize configuration : (t, Concepts.Condition.condition) result = - let open Utilities.Result in - let* connection = Store.connect configuration in - let* branch_index_root = Init.initialize connection in - (* Registry reconstruction from the branch index is the loader boundary. - Until that loader exists, publish only the permanent /system namespace; - importantly, the discovered root remains part of the photograph. *) - let objects = Objects.create ~branch_index_root ~registry:Backend.Managers.Object.root in - Ok {connection; objects} - - let connection runtime = runtime.connection - let objects runtime = runtime.objects -end |
