summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-13 11:03:09 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-13 11:03:09 -0500
commitbad52a2868ff0551ac0199fd8124f81f9623391e (patch)
treecaea90cb436e3646b031734b0b429c0d0a28d8d9 /include
parentd67e2a35789c5e4c7ad603c15d2acdc826fcdc76 (diff)
Finish locking, but it's not yet tested rigorously.
Diffstat (limited to 'include')
-rw-r--r--include/urweb/types_cpp.h3
-rw-r--r--include/urweb/urweb_cpp.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/urweb/types_cpp.h b/include/urweb/types_cpp.h
index 82f8d30a..ce0f2825 100644
--- a/include/urweb/types_cpp.h
+++ b/include/urweb/types_cpp.h
@@ -133,7 +133,8 @@ typedef struct uw_Sqlcache_Value {
typedef struct uw_Sqlcache_Entry uw_Sqlcache_Entry;
typedef struct uw_Sqlcache_Cache {
- pthread_rwlock_t lock;
+ pthread_rwlock_t lockOut;
+ pthread_rwlock_t lockIn;
uw_Sqlcache_Entry *table;
unsigned long timeInvalid;
unsigned long timeNow;
diff --git a/include/urweb/urweb_cpp.h b/include/urweb/urweb_cpp.h
index 2c032e7b..916fbbf9 100644
--- a/include/urweb/urweb_cpp.h
+++ b/include/urweb/urweb_cpp.h
@@ -406,6 +406,8 @@ void uw_Basis_writec(struct uw_context *, char);
// Sqlcache.
+void *uw_Sqlcache_rlock(struct uw_context *, uw_Sqlcache_Cache *);
+void *uw_Sqlcache_wlock(struct uw_context *, uw_Sqlcache_Cache *);
uw_Sqlcache_Value *uw_Sqlcache_check(struct uw_context *, uw_Sqlcache_Cache *, char **);
void *uw_Sqlcache_store(struct uw_context *, uw_Sqlcache_Cache *, char **, uw_Sqlcache_Value *);
void *uw_Sqlcache_flush(struct uw_context *, uw_Sqlcache_Cache *, char **);