Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: third_party/sqlite/sqlite-src-3100200/src/btmutex.c

Issue 1610543003: [sql] Import reference version of SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 ** 2007 August 27 2 ** 2007 August 27
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 lockBtreeMutex(pLater); 134 lockBtreeMutex(pLater);
135 } 135 }
136 } 136 }
137 } 137 }
138 138
139 139
140 /* 140 /*
141 ** Exit the recursive mutex on a Btree. 141 ** Exit the recursive mutex on a Btree.
142 */ 142 */
143 void sqlite3BtreeLeave(Btree *p){ 143 void sqlite3BtreeLeave(Btree *p){
144 assert( sqlite3_mutex_held(p->db->mutex) );
144 if( p->sharable ){ 145 if( p->sharable ){
145 assert( p->wantToLock>0 ); 146 assert( p->wantToLock>0 );
146 p->wantToLock--; 147 p->wantToLock--;
147 if( p->wantToLock==0 ){ 148 if( p->wantToLock==0 ){
148 unlockBtreeMutex(p); 149 unlockBtreeMutex(p);
149 } 150 }
150 } 151 }
151 } 152 }
152 153
153 #ifndef NDEBUG 154 #ifndef NDEBUG
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 int i; 292 int i;
292 for(i=0; i<db->nDb; i++){ 293 for(i=0; i<db->nDb; i++){
293 Btree *p = db->aDb[i].pBt; 294 Btree *p = db->aDb[i].pBt;
294 if( p ){ 295 if( p ){
295 p->pBt->db = p->db; 296 p->pBt->db = p->db;
296 } 297 }
297 } 298 }
298 } 299 }
299 #endif /* if SQLITE_THREADSAFE */ 300 #endif /* if SQLITE_THREADSAFE */
300 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ 301 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3100200/src/bitvec.c ('k') | third_party/sqlite/sqlite-src-3100200/src/btree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698