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

@@ -1,5 +1,5 @@
C Activate\stesting\sof\smem3\sand\smem5.\s\sFix\sproblems\sfound.\s\sTickets\s#3223\nand\s#3225.\s\sOther\stest\sconfiguration\schanges.\s(CVS\s5419) C Fix\sa\sbug\sin\sthe\sHOMEGROWN_RECURSIVE_MUTEX\simplementation\sfor\sunix.\nTicket\s#3224.\s(CVS\s5420)
D 2008-07-16T12:25:32 D 2008-07-16T12:33:24
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in a03f7cb4f7ad50bc53a788c6c544430e81f95de4 F Makefile.in a03f7cb4f7ad50bc53a788c6c544430e81f95de4
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -126,7 +126,7 @@ F src/mem5.c 0b0ba1c2a02d86eb812dea6debacee841e3856f7
F src/mutex.c a485a0eac8ee2cd95f66e565b4c6696c18db968f F src/mutex.c a485a0eac8ee2cd95f66e565b4c6696c18db968f
F src/mutex.h e52ffa1dfc6a6077e8b1823d2c2b7dfcbcf85594 F src/mutex.h e52ffa1dfc6a6077e8b1823d2c2b7dfcbcf85594
F src/mutex_os2.c 9c5637aa4c307c552566d0f0b3bd206245b54a97 F src/mutex_os2.c 9c5637aa4c307c552566d0f0b3bd206245b54a97
F src/mutex_unix.c c1526811f4b97a7cd9d4d72d2b9623d06abd05ce F src/mutex_unix.c 29049a61755cccddb2ee53904e6906bb7674223c
F src/mutex_w32.c f0d21ff1f6981e5aedc56796adf3a347423ef736 F src/mutex_w32.c f0d21ff1f6981e5aedc56796adf3a347423ef736
F src/os.c 292b3b4a49fe5bf6cf2f1cf0af186ebd334e80b8 F src/os.c 292b3b4a49fe5bf6cf2f1cf0af186ebd334e80b8
F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892 F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892
@@ -608,7 +608,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 80e42183066b53129778ae8cbb16e495f7a82990 P a3a7820540f6f2285e6c83cac84383fc7d60d267
R 5ad98becb2e4ee07779bd7da0702c9a6 R f6e03f3f39ec884efd4e9cf222071f50
U drh U drh
Z 73b8f4458cbcc2ee80ce777175a24a15 Z 082673bb41183b6ea93d0e820052f363

View File

@@ -1 +1 @@
a3a7820540f6f2285e6c83cac84383fc7d60d267 9af2514c83782b4745bf48a4f82ff83111fa5535

View File

@@ -11,7 +11,7 @@
************************************************************************* *************************************************************************
** This file contains the C functions that implement mutexes for pthreads ** 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" #include "sqliteInt.h"
@@ -249,7 +249,7 @@ static int pthreadMutexTry(sqlite3_mutex *p){
if( p->nRef>0 && pthread_equal(p->owner, self) ){ if( p->nRef>0 && pthread_equal(p->owner, self) ){
p->nRef++; p->nRef++;
rc = SQLITE_OK; rc = SQLITE_OK;
}else if( pthread_mutex_lock(&p->mutex)==0 ){ }else if( pthread_mutex_trylock(&p->mutex)==0 ){
assert( p->nRef==0 ); assert( p->nRef==0 );
p->owner = self; p->owner = self;
p->nRef = 1; p->nRef = 1;