aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lru_cache.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/lru_cache.sml')
-rw-r--r--src/lru_cache.sml20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lru_cache.sml b/src/lru_cache.sml
index b66becb7..0276de91 100644
--- a/src/lru_cache.sml
+++ b/src/lru_cache.sml
@@ -69,7 +69,9 @@ fun setupQuery {index, params} =
Print.box
[string ("static uw_Sqlcache_Cache cacheStruct" ^ i ^ " = {"),
newline,
- string " .lock = PTHREAD_RWLOCK_INITIALIZER,",
+ string " .lockIn = PTHREAD_RWLOCK_INITIALIZER,",
+ newline,
+ string " .lockOut = PTHREAD_RWLOCK_INITIALIZER,",
newline,
string " .table = NULL,",
newline,
@@ -83,6 +85,22 @@ fun setupQuery {index, params} =
newline,
newline,
+ string ("static void uw_Sqlcache_rlock" ^ i ^ "(uw_context ctx) {"),
+ newline,
+ string (" uw_Sqlcache_rlock(ctx, cache" ^ i ^ ");"),
+ newline,
+ string "}",
+ newline,
+ newline,
+
+ string ("static void uw_Sqlcache_wlock" ^ i ^ "(uw_context ctx) {"),
+ newline,
+ string (" uw_Sqlcache_wlock(ctx, cache" ^ i ^ ");"),
+ newline,
+ string "}",
+ newline,
+ newline,
+
string ("static uw_Basis_string uw_Sqlcache_check" ^ i),
string ("(uw_context ctx" ^ typedArgs ^ ") {"),
newline,