-C Convert\sthe\sunix\sdriver\sto\suse\sa\srecusive\smutex.\s\sSimilar\schanges\sto\sthe\nwindows\sdriver\sare\spending.\s(CVS\s2968)
-D 2006-01-18T14:06:38
+C Recursive\smutexes\sin\sos_win.c.\s(CVS\s2969)
+D 2006-01-18T14:20:17
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
F src/os_unix.c 7c085f807922309006f00b5fd8963865b92ff939
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
-F src/os_win.c b9cb6254698cd7c2587c27e65b78c585473c6ffa
+F src/os_win.c e1c0600129f2468c8a852ae61f7b7bacf72aa7dc
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c e84713f7196a81103cc8e2b55cebbaa1723c4926
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 86eab9e53db8d7fecc789fe3d8cd8d7be3196fed
-R 79ed702da5352631a14fd5c72072c4b8
+P 8830bbbac8e0c9243956aac42dc9f86a0bd1fa07
+R 7ad1313dca6d71746c68d32b98aa5742
U drh
-Z d577dbc25e956de86c8f9b79929b1f93
+Z 25414a8af7b032353ad4c225fe562fb4
-8830bbbac8e0c9243956aac42dc9f86a0bd1fa07
\ No newline at end of file
+dd3e07cae4d0cbd4f8977e1dd11e0103e0e45b75
\ No newline at end of file
*/
static int inMutex = 0;
#ifdef SQLITE_W32_THREADS
+ static HANDLE mutexOwner;
static CRITICAL_SECTION cs;
#endif
}
}
EnterCriticalSection(&cs);
+ mutexOwner = GetCurrentThread();
#endif
- assert( !inMutex );
- inMutex = 1;
+ inMutex++;
}
void sqlite3WinLeaveMutex(){
assert( inMutex );
- inMutex = 0;
+ inMutex--;
#ifdef SQLITE_W32_THREADS
LeaveCriticalSection(&cs);
#endif
** Return TRUE if we are currently within the mutex and FALSE if not.
*/
int sqlite3WinInMutex(){
+#ifdef SQLITE_W32_THREADS
+ return inMutex && mutexOwner==GetCurrentThread();
+#else
return inMutex;
+#endif
}