aboutsummaryrefslogtreecommitdiff
path: root/src/os_win.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-04-29 11:35:28 +0000
committerdan <dan@noemail.net>2016-04-29 11:35:28 +0000
commit20ae3264b81dfb246196c967b922f61ec2ac4e87 (patch)
treeb299e505e533dfb50bfa29f7ef5de361bd675e0f /src/os_win.c
parent9bf0136384c90f4f9e7aacb705575617b459792c (diff)
parent288327ed81ca5b9134a0c967950f9222cddf396c (diff)
downloadsqlite-20ae3264b81dfb246196c967b922f61ec2ac4e87.tar.gz
sqlite-20ae3264b81dfb246196c967b922f61ec2ac4e87.zip
Merge latest trunk changes, including test case fixes, with this branch.
FossilOrigin-Name: 99794aca7b6cb40f08ce4db9889a989fc597eac9
Diffstat (limited to 'src/os_win.c')
-rw-r--r--src/os_win.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/os_win.c b/src/os_win.c
index 1f2646345..9a34d9a10 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -1260,8 +1260,8 @@ int sqlite3_win32_reset_heap(){
int rc;
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
- MUTEX_LOGIC( pMaster = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER); )
- MUTEX_LOGIC( pMem = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM); )
+ MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
+ MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
sqlite3_mutex_enter(pMaster);
sqlite3_mutex_enter(pMem);
winMemAssertMagic();
@@ -3764,10 +3764,12 @@ static int winOpenSharedMemory(winFile *pDbFd){
pShmNode->pNext = winShmNodeList;
winShmNodeList = pShmNode;
- pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
- if( pShmNode->mutex==0 ){
- rc = SQLITE_IOERR_NOMEM_BKPT;
- goto shm_open_err;
+ if( sqlite3GlobalConfig.bCoreMutex ){
+ pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+ if( pShmNode->mutex==0 ){
+ rc = SQLITE_IOERR_NOMEM_BKPT;
+ goto shm_open_err;
+ }
}
rc = winOpen(pDbFd->pVfs,