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

Side by Side Diff: third_party/sqlite/src/src/mutex_w32.c

Issue 2765553002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: Created 3 years, 9 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 14 2 ** 2007 August 14
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 /* 80 /*
81 ** Try to provide a memory barrier operation, needed for initialization 81 ** Try to provide a memory barrier operation, needed for initialization
82 ** and also for the xShmBarrier method of the VFS in cases when SQLite is 82 ** and also for the xShmBarrier method of the VFS in cases when SQLite is
83 ** compiled without mutexes (SQLITE_THREADSAFE=0). 83 ** compiled without mutexes (SQLITE_THREADSAFE=0).
84 */ 84 */
85 void sqlite3MemoryBarrier(void){ 85 void sqlite3MemoryBarrier(void){
86 #if defined(SQLITE_MEMORY_BARRIER) 86 #if defined(SQLITE_MEMORY_BARRIER)
87 SQLITE_MEMORY_BARRIER; 87 SQLITE_MEMORY_BARRIER;
88 #elif defined(__GNUC__) 88 #elif defined(__GNUC__)
89 __sync_synchronize(); 89 __sync_synchronize();
90 #elif !defined(SQLITE_DISABLE_INTRINSIC) && \ 90 #elif MSVC_VERSION>=1300
91 defined(_MSC_VER) && _MSC_VER>=1300
92 _ReadWriteBarrier(); 91 _ReadWriteBarrier();
93 #elif defined(MemoryBarrier) 92 #elif defined(MemoryBarrier)
94 MemoryBarrier(); 93 MemoryBarrier();
95 #endif 94 #endif
96 } 95 }
97 96
98 /* 97 /*
99 ** Initialize and deinitialize the mutex subsystem. 98 ** Initialize and deinitialize the mutex subsystem.
100 */ 99 */
101 static sqlite3_mutex winMutex_staticMutexes[] = { 100 static sqlite3_mutex winMutex_staticMutexes[] = {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 winMutexNotheld 390 winMutexNotheld
392 #else 391 #else
393 0, 392 0,
394 0 393 0
395 #endif 394 #endif
396 }; 395 };
397 return &sMutex; 396 return &sMutex;
398 } 397 }
399 398
400 #endif /* SQLITE_MUTEX_W32 */ 399 #endif /* SQLITE_MUTEX_W32 */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698