mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Add the xInMutex method to the os-layer switch for testing whether or not
mutexes are used correctly. (CVS 2851) FossilOrigin-Name: a582b159595ff8d31c81e9b3044711d6590d3f0e
This commit is contained in:
12
src/os_win.c
12
src/os_win.c
@@ -990,6 +990,17 @@ static void winLeaveMutex(){
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
** Return TRUE if we are currently within the mutex and FALSE if not.
|
||||
** This routine is intended for sanity checking only. It is designed
|
||||
** for use in an assert() to verify that the mutex is held or not held
|
||||
** in certain routines.
|
||||
*/
|
||||
static int winInMutex(){
|
||||
return inMutex;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** The following variable, if set to a non-zero value, becomes the result
|
||||
** returned from sqlite3OsCurrentTime(). This is used for testing.
|
||||
@@ -1062,6 +1073,7 @@ struct sqlite3OsVtbl sqlite3Os = {
|
||||
winCurrentTime,
|
||||
winEnterMutex,
|
||||
winLeaveMutex,
|
||||
winInMutex,
|
||||
winThreadSpecificData,
|
||||
genericMalloc,
|
||||
genericRealloc,
|
||||
|
||||
Reference in New Issue
Block a user