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

Side by Side Diff: third_party/sqlite/src/tool/getlock.c

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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 ** This utility program looks at an SQLite database and determines whether 2 ** This utility program looks at an SQLite database and determines whether
3 ** or not it is locked, the kind of lock, and who is holding this lock. 3 ** or not it is locked, the kind of lock, and who is holding this lock.
4 ** 4 **
5 ** This only works on unix when the posix advisory locking method is used 5 ** This only works on unix when the posix advisory locking method is used
6 ** (which is the default on unix) and when the PENDING_BYTE is in its 6 ** (which is the default on unix) and when the PENDING_BYTE is in its
7 ** usual place. 7 ** usual place.
8 */ 8 */
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 nLock += isLocked(hShm, F_RDLCK, SHM_WRITE, 1, "WAL-WRITE"); 125 nLock += isLocked(hShm, F_RDLCK, SHM_WRITE, 1, "WAL-WRITE");
126 for(i=0; i<SHM_READ_SIZE; i++){ 126 for(i=0; i<SHM_READ_SIZE; i++){
127 nLock += isLocked(hShm, F_WRLCK, SHM_READ_FIRST+i, 1, "WAL-READ"); 127 nLock += isLocked(hShm, F_WRLCK, SHM_READ_FIRST+i, 1, "WAL-READ");
128 } 128 }
129 } 129 }
130 if( nLock==0 ){ 130 if( nLock==0 ){
131 printf("file is not locked\n"); 131 printf("file is not locked\n");
132 } 132 }
133 return 0; 133 return 0;
134 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698