mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Attempt to clarify the operation of the xLock and xUnlock VFS I/O methods.
Assert() statements added to prove that they behave as the documentation says. FossilOrigin-Name: 3efa811251d4510a074231a1e0b667783cc5f90777466b9dcae675cd9892b423
This commit is contained in:
2
src/os.c
2
src/os.c
@@ -106,9 +106,11 @@ int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){
|
||||
}
|
||||
int sqlite3OsLock(sqlite3_file *id, int lockType){
|
||||
DO_OS_MALLOC_TEST(id);
|
||||
assert( lockType>=SQLITE_LOCK_SHARED && lockType<=SQLITE_LOCK_EXCLUSIVE );
|
||||
return id->pMethods->xLock(id, lockType);
|
||||
}
|
||||
int sqlite3OsUnlock(sqlite3_file *id, int lockType){
|
||||
assert( lockType==SQLITE_LOCK_NONE || lockType==SQLITE_LOCK_SHARED );
|
||||
return id->pMethods->xUnlock(id, lockType);
|
||||
}
|
||||
int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){
|
||||
|
Reference in New Issue
Block a user