mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Do not attempt to use TryEnterCriticalSection() under win32. It causes
too many compiler problems. Ticket #2685. (CVS 4471) FossilOrigin-Name: f795431c725d88bd4011f20cf63cac630de842f1
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sproblem\sbuilding\stestfixture\son\smac.\sTicket\s#2689.\s(CVS\s4470)
|
C Do\snot\sattempt\sto\suse\sTryEnterCriticalSection()\sunder\swin32.\s\sIt\scauses\ntoo\smany\scompiler\sproblems.\s\sTicket\s#2685.\s(CVS\s4471)
|
||||||
D 2007-10-05T15:04:13
|
D 2007-10-05T15:08:01
|
||||||
F Makefile.in 75b729d562e9525d57d9890ec598b38e1a8b02bc
|
F Makefile.in 75b729d562e9525d57d9890ec598b38e1a8b02bc
|
||||||
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
|
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -108,7 +108,7 @@ F src/mutex.c 3259f62c2429967aee6dc112117a6d2f499ef061
|
|||||||
F src/mutex.h 079fa6fe9da18ceb89e79012c010594c6672addb
|
F src/mutex.h 079fa6fe9da18ceb89e79012c010594c6672addb
|
||||||
F src/mutex_os2.c 7fe4773e98ed74a63b2e54fc557929eb155f6269
|
F src/mutex_os2.c 7fe4773e98ed74a63b2e54fc557929eb155f6269
|
||||||
F src/mutex_unix.c ff77650261a245035b79c5c8a174f4e05d3cae8a
|
F src/mutex_unix.c ff77650261a245035b79c5c8a174f4e05d3cae8a
|
||||||
F src/mutex_w32.c d2c56fb81aca10af1577bdae2a4083eb2505f8ee
|
F src/mutex_w32.c 6e197765f283815496193e78e9548b5d0e53b68e
|
||||||
F src/os.c 6a84b6ff284fa558e879d9b6a5809004aacc8195
|
F src/os.c 6a84b6ff284fa558e879d9b6a5809004aacc8195
|
||||||
F src/os.h 4c880cf67437f323cd0c3ab2154f1d76babc12d3
|
F src/os.h 4c880cf67437f323cd0c3ab2154f1d76babc12d3
|
||||||
F src/os_common.h 98862f120ca6bf7a48ce8b16f158b77d00bc9d2f
|
F src/os_common.h 98862f120ca6bf7a48ce8b16f158b77d00bc9d2f
|
||||||
@@ -581,7 +581,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||||
P e65842a9d4c779d24207e8a7934fe3bf35ff228b
|
P fe067d706b40d9756433eac9896660514d1c8216
|
||||||
R b83859050d5b26cf66a470937c7295fe
|
R da5eae15cf17bf50336e76f7b8e01006
|
||||||
U danielk1977
|
U drh
|
||||||
Z 80bd2f8fe3f9e95b46cdb428645feda3
|
Z da16cefa553e529b7c5a0949638526d9
|
||||||
|
@@ -1 +1 @@
|
|||||||
fe067d706b40d9756433eac9896660514d1c8216
|
f795431c725d88bd4011f20cf63cac630de842f1
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** This file contains the C functions that implement mutexes for win32
|
** This file contains the C functions that implement mutexes for win32
|
||||||
**
|
**
|
||||||
** $Id: mutex_w32.c,v 1.4 2007/09/05 14:30:42 drh Exp $
|
** $Id: mutex_w32.c,v 1.5 2007/10/05 15:08:01 drh Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -168,16 +168,27 @@ void sqlite3_mutex_enter(sqlite3_mutex *p){
|
|||||||
p->nRef++;
|
p->nRef++;
|
||||||
}
|
}
|
||||||
int sqlite3_mutex_try(sqlite3_mutex *p){
|
int sqlite3_mutex_try(sqlite3_mutex *p){
|
||||||
int rc;
|
int rc = SQLITE_BUSY;
|
||||||
assert( p );
|
assert( p );
|
||||||
assert( p->id==SQLITE_MUTEX_RECURSIVE || sqlite3_mutex_notheld(p) );
|
assert( p->id==SQLITE_MUTEX_RECURSIVE || sqlite3_mutex_notheld(p) );
|
||||||
|
/*
|
||||||
|
** The sqlite3_mutex_try() routine is very rarely used, and when it
|
||||||
|
** is used it is merely an optimization. So it is OK for it to always
|
||||||
|
** fail.
|
||||||
|
**
|
||||||
|
** The TryEnterCriticalSection() interface is only available on WinNT.
|
||||||
|
** And some windows compilers complain if you try to use it without
|
||||||
|
** first doing some #defines that prevent SQLite from building on Win98.
|
||||||
|
** For that reason, we will omit this optimization for now. See
|
||||||
|
** ticket #2685.
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
|
if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
|
||||||
p->owner = GetCurrentThreadId();
|
p->owner = GetCurrentThreadId();
|
||||||
p->nRef++;
|
p->nRef++;
|
||||||
rc = SQLITE_OK;
|
rc = SQLITE_OK;
|
||||||
}else{
|
|
||||||
rc = SQLITE_BUSY;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user