Lines Matching refs:wrapped

47 } wrapped;  variable
51 if( wrapped.mem_fail ){ in wrMemInit()
54 rc = wrapped.mem.xInit(wrapped.mem.pAppData); in wrMemInit()
57 wrapped.mem_init = 1; in wrMemInit()
62 wrapped.mem.xShutdown(wrapped.mem.pAppData); in wrMemShutdown()
63 wrapped.mem_init = 0; in wrMemShutdown()
65 static void *wrMemMalloc(int n) {return wrapped.mem.xMalloc(n);} in wrMemMalloc()
66 static void wrMemFree(void *p) {wrapped.mem.xFree(p);} in wrMemFree()
67 static void *wrMemRealloc(void *p, int n) {return wrapped.mem.xRealloc(p, n);} in wrMemRealloc()
68 static int wrMemSize(void *p) {return wrapped.mem.xSize(p);} in wrMemSize()
69 static int wrMemRoundup(int n) {return wrapped.mem.xRoundup(n);} in wrMemRoundup()
74 if( wrapped.mutex_fail ){ in wrMutexInit()
77 rc = wrapped.mutex.xMutexInit(); in wrMutexInit()
80 wrapped.mutex_init = 1; in wrMutexInit()
85 wrapped.mutex.xMutexEnd(); in wrMutexEnd()
86 wrapped.mutex_init = 0; in wrMutexEnd()
90 return wrapped.mutex.xMutexAlloc(e); in wrMutexAlloc()
93 wrapped.mutex.xMutexFree(p); in wrMutexFree()
96 wrapped.mutex.xMutexEnter(p); in wrMutexEnter()
99 return wrapped.mutex.xMutexTry(p); in wrMutexTry()
102 wrapped.mutex.xMutexLeave(p); in wrMutexLeave()
105 return wrapped.mutex.xMutexHeld(p); in wrMutexHeld()
108 return wrapped.mutex.xMutexNotheld(p); in wrMutexNotheld()
115 if( wrapped.pcache_fail ){ in wrPCacheInit()
118 rc = wrapped.pcache.xInit(wrapped.pcache.pArg); in wrPCacheInit()
121 wrapped.pcache_init = 1; in wrPCacheInit()
126 wrapped.pcache.xShutdown(wrapped.pcache.pArg); in wrPCacheShutdown()
127 wrapped.pcache_init = 0; in wrPCacheShutdown()
131 return wrapped.pcache.xCreate(a, b, c); in wrPCacheCreate()
134 wrapped.pcache.xCachesize(p, n); in wrPCacheCachesize()
137 return wrapped.pcache.xPagecount(p); in wrPCachePagecount()
140 return wrapped.pcache.xFetch(p, a, b); in wrPCacheFetch()
143 wrapped.pcache.xUnpin(p, a, b); in wrPCacheUnpin()
151 wrapped.pcache.xRekey(p, a, b, c); in wrPCacheRekey()
154 wrapped.pcache.xTruncate(p, a); in wrPCacheTruncate()
157 wrapped.pcache.xDestroy(p); in wrPCacheDestroy()
180 memset(&wrapped, 0, sizeof(wrapped)); in installInitWrappers()
183 sqlite3_config(SQLITE_CONFIG_GETMUTEX, &wrapped.mutex); in installInitWrappers()
184 sqlite3_config(SQLITE_CONFIG_GETMALLOC, &wrapped.mem); in installInitWrappers()
185 sqlite3_config(SQLITE_CONFIG_GETPCACHE2, &wrapped.pcache); in installInitWrappers()
202 wrapped.mem_fail = 1; in init_wrapper_install()
204 wrapped.mutex_fail = 1; in init_wrapper_install()
206 wrapped.pcache_fail = 1; in init_wrapper_install()
227 sqlite3_config(SQLITE_CONFIG_MUTEX, &wrapped.mutex); in init_wrapper_uninstall()
228 sqlite3_config(SQLITE_CONFIG_MALLOC, &wrapped.mem); in init_wrapper_uninstall()
229 sqlite3_config(SQLITE_CONFIG_PCACHE2, &wrapped.pcache); in init_wrapper_uninstall()
244 wrapped.mem_fail = 0; in init_wrapper_clear()
245 wrapped.mutex_fail = 0; in init_wrapper_clear()
246 wrapped.pcache_fail = 0; in init_wrapper_clear()
264 if( wrapped.mutex_init ){ in init_wrapper_query()
267 if( wrapped.mem_init ){ in init_wrapper_query()
270 if( wrapped.pcache_init ){ in init_wrapper_query()