Bug fixes in the mutex header file. Tickets #2599 and #2600. (CVS 4335)

FossilOrigin-Name: 4bdfe1419c536fec5b3c0a7fbe3d0ff52f183f43
This commit is contained in:
drh 2007-08-30 14:10:30 +00:00
parent 7751940d6e
commit c7ce76af8f
6 changed files with 25 additions and 24 deletions

View File

@ -1,5 +1,5 @@
C Fixes\sfor\sfailures\sin\sfuzz_malloc.test.\s(CVS\s4334)
D 2007-08-30T11:48:32
C Bug\sfixes\sin\sthe\smutex\sheader\sfile.\s\sTickets\s#2599\sand\s#2600.\s(CVS\s4335)
D 2007-08-30T14:10:30
F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -105,10 +105,10 @@ F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
F src/mem1.c afe2fbf6d7e8247c6c9f69c1481358b1cad60c08
F src/mem2.c 2ba377e2f7d57ec36238456eb44371ac40aa0e94
F src/mutex.c 40e5ba09d56863895882a0204d93832e9960ea78
F src/mutex.h 4d3babe3a691533ac980967d394da512140b5143
F src/mutex.h 079fa6fe9da18ceb89e79012c010594c6672addb
F src/mutex_os2.c d47e9bd495583dd31263d8fe55160a31eb600a3c
F src/mutex_unix.c ff77650261a245035b79c5c8a174f4e05d3cae8a
F src/mutex_w32.c 8716478c5f1829b27fd2c9a0759230a9dc3aa9e3
F src/mutex_w32.c 54beb16ade8f80ea2bc30bc4dfb2087be3487ef3
F src/os.c a8ed3c495161475dbce255f7003144144fb425f1
F src/os.h 2bfbbad126a775e4d8c7d59eb4d9585a5fd7dfb5
F src/os_common.h 98862f120ca6bf7a48ce8b16f158b77d00bc9d2f
@ -130,9 +130,9 @@ F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da
F src/select.c e5cc50e8d22b2490c4fb47f2ef08a9b43bcb52d9
F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
F src/sqlite.h.in 1ef41c05bf64d580e77e6c57f8705cdf36f37be0
F src/sqlite.h.in 4340f2063848977e9eefd534ee13776f5cc9b0f0
F src/sqlite3ext.h 9a26028378c288af500d8b94ed079666fed5806b
F src/sqliteInt.h 1dd9226a6f2f048222d5a5df38ab8cd26d8ece5d
F src/sqliteInt.h 5dbb7a934a88dfa9893e2627f4821b0464f5edc0
F src/sqliteLimit.h 1bcbbdfa856f8b71b561abb31edb864b0eca1d12
F src/table.c 1aeb9eab57b4235db86fe15a35dec76fb445a9c4
F src/tclsqlite.c d76af53f45c9e9f7f7d39531fa4c7bee7d0adad6
@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P d80d87c239df06ef2182bc2b78e6d4c1852d28c9
R 6bcf9078fb1ea6dd2af8be55db3d1f19
U danielk1977
Z 13201505b60e15eac914a3dde38bb1c5
P d3e502263808c1fe0487fda02f16adcbb1279183
R 8ab4e043a311e4bca4b56b1d50a59fcc
U drh
Z 20709391f71da3ae2883ec1a97c7dd8d

View File

@ -1 +1 @@
d3e502263808c1fe0487fda02f16adcbb1279183
4bdfe1419c536fec5b3c0a7fbe3d0ff52f183f43

View File

@ -19,7 +19,7 @@
** Source files should #include the sqliteInt.h file and let that file
** include this one indirectly.
**
** $Id: mutex.h,v 1.1 2007/08/28 16:34:43 drh Exp $
** $Id: mutex.h,v 1.2 2007/08/30 14:10:30 drh Exp $
*/
@ -44,7 +44,7 @@
**
** SQLITE_MUTEX_PTHREADS For multi-threaded applications on Unix.
**
** SQLITE_MUTEX_WIN For multi-threaded applications on Win32.
** SQLITE_MUTEX_W32 For multi-threaded applications on Win32.
**
** SQLITE_MUTEX_OS2 For multi-threaded applications on OS/2.
*/
@ -59,7 +59,7 @@
#endif
#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_WIN
# undef SQLITE_MUTEX_NOOP
# define SQLITE_MUTEX_WIN
# define SQLITE_MUTEX_W32
#endif
#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_OS2
# undef SQLITE_MUTEX_NOOP

View File

@ -11,7 +11,7 @@
*************************************************************************
** This file contains the C functions that implement mutexes for win32
**
** $Id: mutex_w32.c,v 1.1 2007/08/28 16:34:43 drh Exp $
** $Id: mutex_w32.c,v 1.2 2007/08/30 14:10:30 drh Exp $
*/
#include "sqliteInt.h"
@ -19,7 +19,7 @@
** The code in this file is only used if we are compiling multithreaded
** on a win32 system.
*/
#ifdef SQLITE_MUTEX_WIN32
#ifdef SQLITE_MUTEX_W32
/*
** Each recursive mutex is an instance of the following structure.
@ -178,4 +178,4 @@ int sqlite3_mutex_held(sqlite3_mutex *p){
int sqlite3_mutex_notheld(sqlite3_mutex *p){
return p==0 || p->nRef==0 || p->owner!=GetCurrentThreadId();
}
#endif /* SQLITE_MUTEX_WIN */
#endif /* SQLITE_MUTEX_W32 */

View File

@ -30,7 +30,7 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.247 2007/08/29 12:31:28 danielk1977 Exp $
** @(#) $Id: sqlite.h.in,v 1.248 2007/08/30 14:10:30 drh Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
@ -3278,16 +3278,17 @@ int sqlite3_vfs_unregister(sqlite3_vfs*);
** implementations are available in the SQLite core:
**
** <ul>
** <li> SQLITE_MUTEX_OS2
** <li> SQLITE_MUTEX_PTHREAD
** <li> SQLITE_MUTEX_WIN
** <li> SQLITE_MUTEX_W32
** <li> SQLITE_MUTEX_NOOP
** </ul>
**
** The SQLITE_MUTEX_NOOP implementation is a set of routines
** that does no real locking and is appropriate for use in
** a single-threaded application. The SQLITE_MUTEX_PTHREAD
** and SQLITE_MUTEX_WIN implementations are appropriate for
** use on unix and windows.
** a single-threaded application. The SQLITE_MUTEX_OS2,
** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
** are appropriate for use on os/2, unix, and windows.
**
** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex

View File

@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.605 2007/08/29 12:31:28 danielk1977 Exp $
** @(#) $Id: sqliteInt.h,v 1.606 2007/08/30 14:10:30 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@ -73,7 +73,6 @@
#include "sqlite3.h"
#include "hash.h"
#include "parse.h"
#include "mutex.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -295,6 +294,7 @@ typedef struct WhereInfo WhereInfo;
typedef struct WhereLevel WhereLevel;
#include "os.h"
#include "mutex.h"
/*
** Each database file to be accessed by the system is an instance