diff src/cache.sml @ 2286:0bdfec16a01d

Fix issue with one-element caches. Locking still WIP.
author Ziv Scully <ziv@mit.edu>
date Fri, 13 Nov 2015 01:04:32 -0500
parents af1585e7d645
children
line wrap: on
line diff
--- a/src/cache.sml	Thu Nov 12 16:36:35 2015 -0500
+++ b/src/cache.sml	Fri Nov 13 01:04:32 2015 -0500
@@ -2,13 +2,14 @@
 
 type cache =
      {(* Takes a query ID and parameters (and, for store, the value to
-            store) and gives an FFI call that checks, stores, or flushes the
-            relevant entry. The parameters are strings for check and store and
-            optional strings for flush because some parameters might not be
-            fixed. *)
+         store) and gives an FFI call that checks, stores, or flushes the
+         relevant entry. The parameters are strings for check and store and
+         optional strings for flush because some parameters might not be
+         fixed. *)
       check : int * Mono.exp list -> Mono.exp',
       store : int * Mono.exp list * Mono.exp -> Mono.exp',
       flush : int * Mono.exp list -> Mono.exp',
+      lock : int * bool (* true = write, false = read *) -> Mono.exp',
       (* Generates C needed for FFI calls in check, store, and flush. *)
       setupGlobal : Print.PD.pp_desc,
       setupQuery : {index : int, params : int} -> Print.PD.pp_desc}