diff include/urweb/types_cpp.h @ 2285:ad3ce1528f71

Fix committing multiple stores/flushes. Locking is WIP.
author Ziv Scully <ziv@mit.edu>
date Thu, 12 Nov 2015 16:36:35 -0500
parents 472b4504aef2
children 98f96a976ede
line wrap: on
line diff
--- a/include/urweb/types_cpp.h	Thu Nov 12 11:44:21 2015 -0500
+++ b/include/urweb/types_cpp.h	Thu Nov 12 16:36:35 2015 -0500
@@ -121,6 +121,7 @@
 
 // Caching
 
+#include <pthread.h>
 #include "uthash.h"
 
 typedef struct uw_Sqlcache_Value {
@@ -132,7 +133,7 @@
 typedef struct uw_Sqlcache_Entry uw_Sqlcache_Entry;
 
 typedef struct uw_Sqlcache_Cache {
-  //pthread_rwlock_t *lock;
+  pthread_rwlock_t lock;
   uw_Sqlcache_Entry *table;
   unsigned long timeInvalid;
   unsigned long timeNow;