1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a bug in the HOMEGROWN_RECURSIVE_MUTEX implementation for unix.

Ticket #3224. (CVS 5420)

FossilOrigin-Name: 9af2514c83782b4745bf48a4f82ff83111fa5535
This commit is contained in:
drh
2008-07-16 12:33:23 +00:00
parent 7830cd41ba
commit 3bbc0e7bc5
3 changed files with 9 additions and 9 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains the C functions that implement mutexes for pthreads
**
** $Id: mutex_unix.c,v 1.12 2008/06/19 16:07:07 drh Exp $
** $Id: mutex_unix.c,v 1.13 2008/07/16 12:33:24 drh Exp $
*/
#include "sqliteInt.h"
@@ -249,7 +249,7 @@ static int pthreadMutexTry(sqlite3_mutex *p){
if( p->nRef>0 && pthread_equal(p->owner, self) ){
p->nRef++;
rc = SQLITE_OK;
}else if( pthread_mutex_lock(&p->mutex)==0 ){
}else if( pthread_mutex_trylock(&p->mutex)==0 ){
assert( p->nRef==0 );
p->owner = self;
p->nRef = 1;