Home | History | Annotate | Download | only in dist

Lines Matching full:locks

1096 ** functions to enable blocking locks with timeouts, to change the
1097 ** locking strategy (for example to use dot-file locks), to inquire
1098 ** about the status of a lock, or to break stale locks. The SQLite
3344 ** database locks it needs to do its job. ^If the statement is a [COMMIT]
6046 ** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
6056 ** ^Shared-cache locks are released when a database connection concludes
7964 ** sqlite3OsLock(). The various locks exhibit the following semantics:
7968 ** any time. Other processes may hold and obtain new SHARED locks.
7970 ** any one time. Existing SHARED locks may persist, but no new
7971 ** SHARED locks may be obtained by other processes.
7972 ** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.
8004 ** which means we can use reader/writer locks. When reader/writer locks
8014 ** shared locks begins at SHARED_FIRST.
8020 ** tool is being used for file sharing) implements locks correctly between
8027 ** that all locks will fit on a single page even at the minimum page size.
8028 ** PENDING_BYTE defines the beginning of the locks. By default PENDING_BYTE
8406 ** tried to do recently failed with an SQLITE_LOCKED error due to locks
9626 ** used to store the set of table-locks required by the statement being
9669 int nTableLock; /* Number of locks in aTableLock */
9670 TableLock *aTableLock; /* Required table locks for shared-cache mode */
10799 ** for use by the VFS layers as space for managing file locks.
10875 ** caller holds appropriate locks.
17834 BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */
20449 ** erases all locks at once and returns us immediately to locking level 0.
21311 ** implementation uses Posix Advisory Locks. Alternative implementations
21325 ** + for Posix Advisory Locks
21326 ** + for no-op locks
21327 ** + for dot-file locks
21329 ** + for named semaphore locks (VxWorks only)
21330 ** + for AFP filesystem locks (MacOSX only)
21481 struct unixLockInfo *pLock; /* Info about locks on this inode */
21835 ** This routine is used for troubleshooting locks on multithreaded
21899 ** Errors during initialization of locks, or file system support for locks,
22100 ** POSIX advisory locks are broken by design. ANSI STD 1003.1 (1996)
22102 ** sets or clears a lock, that operation overrides any prior locks set
22104 ** that it overrides locks set by the same process using a different
22115 ** But not so. Since both locks came from the same process, the
22119 ** This means that we cannot use POSIX locks to synchronize file access
22120 ** among competing threads of the same process. POSIX locks will work fine
22124 ** To work around the problem, SQLite has to manage file locks internally
22128 ** and check for locks already existing on that inode. When locks are
22130 ** locks to see if another thread has previously set a lock on that same
22140 ** locks on the corresponding inode. There is one locking structure
22146 ** cnt>0 means there are cnt shared locks on the file.
22153 ** But wait: there are yet more problems with POSIX advisory locks.
22155 ** If you close a file descriptor that points to a file that has locks,
22156 ** all locks on that file that are owned by the current process are
22161 ** other unixFile open on the same inode that are holding locks, the call
22162 ** to close() the file descriptor is deferred until all of the locks clear.
22167 ** Yet another problem: LinuxThreads do not play well with posix locks.
22174 ** on linux - with NPTL a lock created by thread A can override locks
22177 ** compile-time whether or not thread A can override locks on thread B.
22181 ** On systems where thread A is unable to modify locks created by
22194 ** not allow locks to be overridden by other threads and that restriction
22196 ** to another while locks are held.
22200 ** overriding each others locks (which is now the most common behavior)
22201 ** or if no locks are held. But the unixFile.pLock field needs to be
22232 ** If threads cannot override each others locks (LinuxThreads), then we
22234 ** each others locks (Posix and NPTL) then tid is always set to zero.
22256 int cnt; /* Number of SHARED locks held */
22265 ** inode. This structure keeps track of the number of locks on that
22267 ** locks, the close is deferred until all locks clear by adding the
22278 int nLock; /* Number of outstanding locks */
22298 ** locks.
22300 ** 0: No. Threads cannot override each others locks. (LinuxThreads)
22301 ** 1: Yes. Threads can override each others locks. (Posix & NLPT)
22305 ** others locks. On those systems, the SQLITE_THREAD_OVERRIDE_LOCK macro
22356 ** can override each others locks then sets the
22758 /* The following describes the implementation of the various locks and
22760 ** lock primitives (called read-locks and write-locks below, to avoid
22779 ** on the 'pending byte'. This ensures that no new SHARED locks can be
22780 ** obtained, but existing SHARED locks are allowed to persist. A process
22787 ** range'. Since all other locks require a read-lock on one of the bytes
22788 ** within this range, this ensures that no other locks are held on the
22792 ** range' is that some versions of windows do not support read-locks. By
22793 ** locking a random byte from a range, concurrent SHARED locks may exist
23135 /* Decrement the count of locks against this same file. When the
23137 ** was deferred because of outstanding locks.
23212 /* If there are outstanding locks, do not actually close the file just
23213 ** yet because that would clear those locks. Instead, add the file
23476 ** PENDING locks are the same thing as an EXCLUSIVE lock. SQLite
23565 ** flock() only really support EXCLUSIVE locks. We track intermediate
23566 ** lock states in the sqlite3_file structure, but all locks SHARED or
23567 ** above are really EXCLUSIVE locks and exclude all other processes from
23750 ** Semaphore locks only really support EXCLUSIVE locks. We track intermediate
23751 ** lock states in the sqlite3_file structure, but all locks SHARED or
23752 ** above are really EXCLUSIVE locks and exclude all other processes from
24208 /* If there are outstanding locks, do not actually close the file just
24209 ** yet because that would clear those locks. Instead, add the file
24864 ** flag to force the posix advisory locks to cover the whole file instead
24952 ** assume that the file-system supports POSIX style locks.
24990 /* Test if fcntl() is supported and use POSIX style locks.
25086 ** handle h - as it is guaranteed that no posix locks will be released
25499 ** it would not be safe to close as this would release any locks held
25527 ** on that file that are currently holding advisory locks on it,
25528 ** then the call to close() will cancel those locks. In practice,
25881 ** The default locking schemes in SQLite use byte-range locks on the
25885 ** as POSIX read & write locks over fixed set of locations (via fsctl),
25886 ** on AFP and SMB only exclusive byte-range locks are available via fsctl
25898 ** the read cache when byte-range locks are present. Enabling the read
25909 ** single host at a time and moving file locks off of the database file
25913 ** Using proxy locks
25952 ** * proxy file to act as a proxy for the advisory locks normally
25968 ** The proxy file - a single-byte file used for all advisory file locks
26246 ** POSIX locks prematurely.
26940 ** Close a file that uses proxy locks.
27402 int nReaders; /* Number of reader locks obtained */
27425 winceLock local; /* Locks obtained by this instance of winFile */
27740 ** Destroy the part of winFile that deals with wince locks
27748 are to cleanup in case any locks remained open */
28230 ** erases all locks at once and returns us immediately to locking level 0.
32693 ** it moves to PAGER_EXCLUSIVE. No locks are downgraded when running in
35219 ** Since Lookup() never goes to disk, it never has to deal with locks
35533 /* If the required locks were successfully obtained, open the journal
35609 ** which means they have acquired the necessary locks and opened
35633 ** contains the database locks. The following assert verifies
36175 ** to drop any locks either.
37105 ** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor
37106 ** is opened on the table with root page BtShared.iTable. Locks are removed
37188 ** table (because there exists one or more read-locks on the table),
37196 ** 2) The number of locks held by other connections drops to zero.
37229 BtLock *pLock; /* List of locks held on this shared-btree struct */
37232 u8 isPending; /* If waiting for read-locks to clear */
37528 /* To avoid deadlock, first release all locks with a larger
37530 ** the other BtShared locks that we used to hold in ascending
37857 ** shared-cache table level locks. If the library is compiled with the
37876 ** Check to see if pBtree holds the required locks to read or write to the
37917 ** the correct locks are held. So do not bother - just return true.
38125 ** Release all the table locks (locks obtained via calls to
38163 ** that writer, then the number of locks held by connections other
38175 ** This function changes all write-locks held by Btree p into read-locks.
39771 ** The call to sqlite3BtreeRollback() drops any table-locks held by
40741 ** disk and we are still holding all locks, so the transaction has not
40825 ** drop locks.
41028 ** from a normal transaction rollback, as no locks are released and the
41092 ** b-tree database, the connection is holding the required table locks,
45660 ** (d) there are no conflicting read-locks, and
49583 /* Release the locks */
49601 /* If the auto-commit flag is set to true, then any locks that were held
66657 ** obtain the required table-locks. This is a no-op unless the
77703 ** the value sets a specific file to be used for database access locks.
78940 ** locks on the schema, we just need to make sure nobody else is
85792 ** database. No locks are held on any other files (since the main file
85900 ** Locks nest. Every lock should have a corresponding unlock.
85904 ** the disconnect is deferred until all locks have been removed.
96110 ** locks and does not require any further unlock-notify callbacks.
97968 ** its locks.
98034 ** the transaction opened by database db has just finished. Locks held