comparison 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
comparison
equal deleted inserted replaced
2284:472b4504aef2 2285:ad3ce1528f71
119 char *start, *front, *back; 119 char *start, *front, *back;
120 } uw_buffer; 120 } uw_buffer;
121 121
122 // Caching 122 // Caching
123 123
124 #include <pthread.h>
124 #include "uthash.h" 125 #include "uthash.h"
125 126
126 typedef struct uw_Sqlcache_Value { 127 typedef struct uw_Sqlcache_Value {
127 char *result; 128 char *result;
128 char *output; 129 char *output;
130 } uw_Sqlcache_Value; 131 } uw_Sqlcache_Value;
131 132
132 typedef struct uw_Sqlcache_Entry uw_Sqlcache_Entry; 133 typedef struct uw_Sqlcache_Entry uw_Sqlcache_Entry;
133 134
134 typedef struct uw_Sqlcache_Cache { 135 typedef struct uw_Sqlcache_Cache {
135 //pthread_rwlock_t *lock; 136 pthread_rwlock_t lock;
136 uw_Sqlcache_Entry *table; 137 uw_Sqlcache_Entry *table;
137 unsigned long timeInvalid; 138 unsigned long timeInvalid;
138 unsigned long timeNow; 139 unsigned long timeNow;
139 size_t numKeys; 140 size_t numKeys;
140 UT_hash_handle hh; 141 UT_hash_handle hh;