diff options
author | drh <drh@noemail.net> | 2008-07-16 12:33:23 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-07-16 12:33:23 +0000 |
commit | 3bbc0e7bc51525181bff279e5945c9d0b1091fd1 (patch) | |
tree | d31d050689ed841549c8309d9f129ff638ce1039 /src/mutex_unix.c | |
parent | 7830cd41baaa8181f395e5e45e47454706f360a5 (diff) | |
download | sqlite-3bbc0e7bc51525181bff279e5945c9d0b1091fd1.tar.gz sqlite-3bbc0e7bc51525181bff279e5945c9d0b1091fd1.zip |
Fix a bug in the HOMEGROWN_RECURSIVE_MUTEX implementation for unix.
Ticket #3224. (CVS 5420)
FossilOrigin-Name: 9af2514c83782b4745bf48a4f82ff83111fa5535
Diffstat (limited to 'src/mutex_unix.c')
-rw-r--r-- | src/mutex_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mutex_unix.c b/src/mutex_unix.c index 5288ae42f..31f9a97b9 100644 --- a/src/mutex_unix.c +++ b/src/mutex_unix.c @@ -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; |