aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.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_unix.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_unix.c')
-rw-r--r--src/os_unix.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index aadb414af..01de00e0d 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4288,10 +4288,12 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
pShmNode->h = -1;
pDbFd->pInode->pShmNode = pShmNode;
pShmNode->pInode = pDbFd->pInode;
- pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
- if( pShmNode->mutex==0 ){
- rc = SQLITE_NOMEM_BKPT;
- goto shm_open_err;
+ if( sqlite3GlobalConfig.bCoreMutex ){
+ pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+ if( pShmNode->mutex==0 ){
+ rc = SQLITE_NOMEM_BKPT;
+ goto shm_open_err;
+ }
}
if( pInode->bProcessLock==0 ){