diff options
author | drh <> | 2022-10-04 14:50:46 +0000 |
---|---|---|
committer | drh <> | 2022-10-04 14:50:46 +0000 |
commit | 2eca06141feae3d241776e59b798b4aa1ce128b6 (patch) | |
tree | c470c67c66b29ddc8af5afc10aa183a39ea2d9ff /src/os.c | |
parent | a4b2f419382c95cd2f4924d0394f37b3d2f0cfce (diff) | |
download | sqlite-2eca06141feae3d241776e59b798b4aa1ce128b6.tar.gz sqlite-2eca06141feae3d241776e59b798b4aa1ce128b6.zip |
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
Diffstat (limited to 'src/os.c')
-rw-r--r-- | src/os.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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){ |