| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 */ |
| OLD | NEW |