Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplifications to the sqlite3BtreeEnterAll() and LeaveAll() routines. Just have them call BtreeEnter and BtreeLeave() repeatedly rather than trying to be clever. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
51039b3578f948c23a810d176e81fa51 |
User & Date: | drh 2011-04-05 19:27:41.740 |
Context
2011-04-05
| ||
22:08 | Suppress many harmless compiler warnings, mostly signed/unsigned comparisons within asserts or unused parameters in extensions. (check-in: 3eeb0ff78d user: drh tags: trunk) | |
19:27 | Simplifications to the sqlite3BtreeEnterAll() and LeaveAll() routines. Just have them call BtreeEnter and BtreeLeave() repeatedly rather than trying to be clever. (check-in: 51039b3578 user: drh tags: trunk) | |
19:26 | Simplifications to the sqlite3ResetInternalSchema() logic to eliminate unreachable branches. (check-in: a4c3ac989d user: drh tags: trunk) | |
Changes
Changes to src/btmutex.c.
︙ | ︙ | |||
182 183 184 185 186 187 188 | ** Enter the mutexes in accending order by BtShared pointer address ** to avoid the possibility of deadlock when two threads with ** two or more btrees in common both try to lock all their btrees ** at the same instant. */ void sqlite3BtreeEnterAll(sqlite3 *db){ int i; | | < < < < < < < < < < < < < < | < < < < < | < < < < < < | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | ** Enter the mutexes in accending order by BtShared pointer address ** to avoid the possibility of deadlock when two threads with ** two or more btrees in common both try to lock all their btrees ** at the same instant. */ void sqlite3BtreeEnterAll(sqlite3 *db){ int i; Btree *p; assert( sqlite3_mutex_held(db->mutex) ); for(i=0; i<db->nDb; i++){ p = db->aDb[i].pBt; if( p ) sqlite3BtreeEnter(p); } } void sqlite3BtreeLeaveAll(sqlite3 *db){ int i; Btree *p; assert( sqlite3_mutex_held(db->mutex) ); for(i=0; i<db->nDb; i++){ p = db->aDb[i].pBt; if( p ) sqlite3BtreeLeave(p); } } #ifndef NDEBUG /* ** Return true if the current thread holds the database connection ** mutex and all required BtShared mutexes. |
︙ | ︙ |