diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index adc89f5a7..76b4497a6 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -8067,6 +8067,21 @@ int sqlite3_os_init(void){ sqlite3_vfs_register(&aVfs[i], i==0); } unixBigLock = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1); + + /* Validate lock assumptions */ + assert( SQLITE_SHM_NLOCK==8 ); /* Number of available locks */ + assert( UNIX_SHM_BASE==120 ); /* Start of locking area */ + /* Locks: + /* WRITE UNIX_SHM_BASE 120 */ + /* CKPT UNIX_SHM_BASE+1 121 */ + /* RECOVER UNIX_SHM_BASE+2 122 */ + /* READ-0 UNIX_SHM_BASE+3 123 */ + /* READ-1 UNIX_SHM_BASE+4 124 */ + /* READ-2 UNIX_SHM_BASE+5 125 */ + /* READ-3 UNIX_SHM_BASE+6 126 */ + /* READ-4 UNIX_SHM_BASE+7 127 */ + /* DMS UNIX_SHM_BASE+8 128 */ + assert( UNIX_SHM_DMS==128 ); /* Byte offset of the deadman-switch */ return SQLITE_OK; } |