Flags for the xShmLock VFS method

Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Support |

## SQLite C Interface

## Flags for the xShmLock VFS method

>     #define SQLITE_SHM_UNLOCK       1
>     #define SQLITE_SHM_LOCK         2
>     #define SQLITE_SHM_SHARED       4
>     #define SQLITE_SHM_EXCLUSIVE    8

These integer constants define the various locking operations allowed by the xShmLock method of sqlite3_io_methods. The following are the only legal combinations of flags to the xShmLock method:

- SQLITE_SHM_LOCK | SQLITE_SHM_SHARED
- SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE
- SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED
- SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE

When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as was given no the corresponding lock.

The xShmLock method can transition between unlocked and SHARED or between unlocked and EXCLUSIVE. It cannot transition between SHARED and EXCLUSIVE.

See also lists of Objects, Constants, and Functions.