diff options
author | Ziv Scully <ziv@mit.edu> | 2015-11-12 16:36:35 -0500 |
---|---|---|
committer | Ziv Scully <ziv@mit.edu> | 2015-11-12 16:36:35 -0500 |
commit | 06464bd07cb1efbc9df4ca650978c14f4c20390a (patch) | |
tree | 412f14366e3baf7b31c9052cea1ac267fc1eb765 /src/lru_cache.sml | |
parent | fd7375f584790047731686345c8ce6fedee71435 (diff) |
Fix committing multiple stores/flushes. Locking is WIP.
Diffstat (limited to 'src/lru_cache.sml')
-rw-r--r-- | src/lru_cache.sml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lru_cache.sml b/src/lru_cache.sml index 9d65420b..b6ffe700 100644 --- a/src/lru_cache.sml +++ b/src/lru_cache.sml @@ -65,8 +65,8 @@ fun setupQuery {index, params} = in Print.box [string ("static uw_Sqlcache_Cache cacheStruct" ^ i ^ " = {"), - (* newline, *) - (* string " .lock = PTHREAD_RWLOCK_INITIALIZER,", *) + newline, + string " .lock = PTHREAD_RWLOCK_INITIALIZER,", newline, string " .table = NULL,", newline, @@ -85,7 +85,7 @@ fun setupQuery {index, params} = newline, string (" char *ks[] = {" ^ revArgs ^ "};"), newline, - string (" uw_Sqlcache_Value *v = uw_Sqlcache_check(cache" ^ i ^ ", ks);"), + string (" uw_Sqlcache_Value *v = uw_Sqlcache_check(ctx, cache" ^ i ^ ", ks);"), newline, (* If the output is null, it means we had too much recursion, so it's a miss. *) string " if (v && v->output != NULL) {", @@ -123,7 +123,7 @@ fun setupQuery {index, params} = newline, string (" puts(\"SQLCACHE: stored " ^ i ^ ".\");"), newline, - string (" uw_Sqlcache_store(cache" ^ i ^ ", ks, v);"), + string (" uw_Sqlcache_store(ctx, cache" ^ i ^ ", ks, v);"), newline, string " return uw_unit_v;", newline, |