]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove unnecessary #includes of "os.h". New mutex implementations. (CVS 4255)
authordrh <drh@noemail.net>
Tue, 21 Aug 2007 10:44:15 +0000 (10:44 +0000)
committerdrh <drh@noemail.net>
Tue, 21 Aug 2007 10:44:15 +0000 (10:44 +0000)
FossilOrigin-Name: fbbd5bda544ffec4e1b43407b12e546235dc7873

39 files changed:
manifest
manifest.uuid
src/date.c
src/func.c
src/legacy.c
src/loadext.c
src/main.c
src/malloc.c
src/mutex.c
src/os.c
src/os.h
src/os_os2.c
src/os_unix.c
src/os_win.c
src/pager.c
src/parse.y
src/pragma.c
src/prepare.c
src/random.c
src/tclsqlite.c
src/test1.c
src/test2.c
src/test3.c
src/test4.c
src/test5.c
src/test6.c
src/test7.c
src/test8.c
src/test9.c
src/test_async.c
src/test_config.c
src/test_tclvar.c
src/tokenize.c
src/util.c
src/vacuum.c
src/vdbe.c
src/vdbeapi.c
src/vdbeaux.c
src/vdbemem.c

index 4cffcc0ed2178cc46027ae67747bdaad3e1e3e2d..6d0174590d9239570d10d738759908e8fefd26cb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C The\squick\stest\sruns\sagain\swith\sa\shandfull\sof\serrors\safter\sadding\sthe\nmutex\slocks\sto\sbtree,\sthe\sVFS\sregistration\sinterfaces,\sand\sFTS3.\s(CVS\s4254)
-D 2007-08-20T23:50:25
+C Remove\sunnecessary\s#includes\sof\s"os.h".\s\sNew\smutex\simplementations.\s(CVS\s4255)
+D 2007-08-21T10:44:16
 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -86,41 +86,41 @@ F src/btreeInt.h e93edf57832278138b98cf60cbc54241103c6988
 F src/build.c add67be992307b4b11849a6611bfd3352aacde92
 F src/callback.c 143436453bb93e831c9574fea0b9b9eb90e40ff3
 F src/complete.c ea63834e798a0ab14159bdc6e6cabc3df21aa346
-F src/date.c 8c37dbbabc9fceec51e8adfcd771328345679b14
+F src/date.c 70a5af1944c0b76bed917cab3c1ca47e5f97d359
 F src/delete.c 849846d06d29851dde0d9f424a5de5817eb140d1
 F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
 F src/expr.c 3ea108a9e409f58b8203e29c54442da5085be5bf
-F src/func.c 472c0610164180624ff5aa51b0521a331bfef11b
+F src/func.c 8516d5f97ddc1004537490fbaffa9a8b0da5c4bb
 F src/hash.c 2f322979071dd2bdba7503b5276d66f028744382
 F src/hash.h 3ad3da76bfb954978d227bf495568b0e6da2c19e
 F src/insert.c 633322aef1799f6604fa805e12488bc628570b0c
-F src/legacy.c 6013a7cb7da1b72550b3d35d4fc598b3c3e5b8c1
+F src/legacy.c a83519a8fbb488c3155fca577b010d590ec479e9
 F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35
-F src/loadext.c c0ccda3dbda109da087a8fd762deebe5fdf24a1d
-F src/main.c 7310dd532c1ff751772b196c98f7e0534afd7e58
-F src/malloc.c 613c65f12ff0ee4edd017aa458209ab7a23cd7b1
+F src/loadext.c 245ef19db91d86b394ad50366d69f160c46764d9
+F src/main.c 3f8917757c7f6a937e300b613b9cfd1bbe703c70
+F src/malloc.c c2f5da620d8e030c6974a0ddcaeb7b408c9bdb3d
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/mem1.c 30bf8be3846f92fdf88c490c5e5378512383bcbe
 F src/mem2.c 482f0aaf14e8ef1db64cb8c5b9a9bfe708297c92
-F src/mutex.c 60051a86c49cfe2ec15dd8b1d9d0d530b8893b07
-F src/os.c c9f91550afa071c5b98042ce14d38a2d87c3f4df
-F src/os.h da098cad985b4849fefdd6a96d671b332008aa55
+F src/mutex.c 56bd91271f18300aa7da45608bd8956abe471d10
+F src/os.c dfe4718104a795c4a5e4cd927b6b00c24c004c58
+F src/os.h 399c89cafa93b9ef35c3dc70f77644d10936b535
 F src/os_common.h a5c446d3b93f09f369d13bf217de4bed3437dd1c
-F src/os_os2.c cba4e96fadb949076c717108fe0599d1a3c2e446
+F src/os_os2.c 8769301bff502de642ad2634cedcb77d967ce199
 F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
-F src/os_unix.c 41a737d14d00b93fae8efd0d0555922f07a29ada
+F src/os_unix.c 55e4d3c441e6b9e2dd36160e61df827bac1ea41d
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
-F src/os_win.c d868d5f9e95ec9c1b9e2a30c54c996053db6dddd
+F src/os_win.c 29c0e19c1072679a4c7818c49fab2f35d2ad7747
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c 53af3942f97b077886e035ed15781d1f887713b6
+F src/pager.c bb25ee85c990241be0f321978e6c5f6b645692b2
 F src/pager.h 53087c6fb9db01aed17c7fd044662a27507e89b8
-F src/parse.y c03529c3b82702ada98ce405b390e3a9409708cf
-F src/pragma.c 8f5e37c3cf6dbdeb3645bb80cc58cfc3324c0178
-F src/prepare.c 03292beeffce2d65debab12508a8ec1f5aec7241
+F src/parse.y 2d2ce439dc6184621fb0b86f4fc5aca7f391a590
+F src/pragma.c 9b989506a1b7c8aecd6befb8235e2f57a4aba7e5
+F src/prepare.c 5bc8c7a943215302943fec831f8c646f6dfdf76a
 F src/printf.c a8f46e0ed360c18d40e89aa636533be300b406c2
-F src/random.c af7264b4ed93330b3bf40dd123e16e7f8f62e5bb
+F src/random.c 89b2c5a97f5059c486c021ffc2d72c9d779ccae8
 F src/select.c 98c367bce3f38c5adfcc97de9ab5c79b0e5dc2b2
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
@@ -129,41 +129,41 @@ F src/sqlite3ext.h 647a6b8a8f76ff6c9611e4a071531d8e63ff2d6b
 F src/sqliteInt.h 6891d6864a6b9fc661eadaa0328e81dff7523584
 F src/sqliteLimit.h f14609c27636ebc217c9603ade26dbdd7d0f6afa
 F src/table.c c725e47f6f3092b9a7b569fc58e408e2173ee008
-F src/tclsqlite.c 0606c4f31711492eb4d7480a981eebb80914f3d9
-F src/test1.c 6ae17d70dac0f14ab632f66c026a44fb0c71f22e
-F src/test2.c 4506b6635e193a19a9bccdbe366ff4aed09cbe79
-F src/test3.c b6d6a452a394c690395b1d7155e7bf00fb99a12d
-F src/test4.c 1f4d2ed89867bac187d49ed8004f121592987d3e
-F src/test5.c 7bc8a87c2b6fd076ec2ca9972946e71a367883ad
-F src/test6.c b0090b4826d5e06df2ff2d5acaddf3f8f708fcd2
-F src/test7.c 0f9d91ce8018740d5eb6e258f0fac2a2943c40f0
-F src/test8.c 719c284607c1e91a893f5425df1e92b74c859aef
-F src/test9.c c0f38f7795cc51d37db6c63874d90f40f10d0f0e
-F src/test_async.c ba48913e4bab43b149747d3bdd3b75b1f66658ec
+F src/tclsqlite.c 299fb45c5cf983b49b2c984b87b936b8132fbfe2
+F src/test1.c 9e9651b0b9f85654b4bf28dfad787bc21a33aae5
+F src/test2.c 4f742e99ed1bea5c14692f627bdb59a146f30504
+F src/test3.c 2e4da0fe90a0aa8cf9276ea34cbe92e91dc1db07
+F src/test4.c d97b87919dc3db1cc5fccc04a33f030d5940e1a9
+F src/test5.c 81353afad5d795ae7155bffce1e4deef10ee8e22
+F src/test6.c 9a93a5538f4ec008e8471635889091b087328532
+F src/test7.c 50f5aa04fd751528ad5ee50e9be9ecee6f0b574a
+F src/test8.c 4bf571b82e502094846ae06e30fe028f190aaaae
+F src/test9.c b46c8fe02ac7cca1a7316436d8d38d50c66f4b2f
+F src/test_async.c 9f3ab66e848930d1c3a7bc2dde77b9b643f6e4ba
 F src/test_autoext.c 855157d97aa28cf84233847548bfacda21807436
 F src/test_btree.c c1308ba0b88ab577fa56c9e493a09829dfcded9c
-F src/test_config.c 6e2cad5669f13b38b8e02850157448a757f21df7
+F src/test_config.c 6c74d82fd4a0a5a3bebd53a9cb2cb6c02af68e07
 F src/test_hexio.c 82916f918687502658f02533b519c38cb180db6d
 F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
 F src/test_malloc.c d9ba6be85f9c4a439b19f6e0a72d91c369d72c63
 F src/test_md5.c d9f828765b242ff86f58cd879259c3da4eaede02
 F src/test_schema.c 12c9de7661d6294eec2d57afbb52e2af1128084f
 F src/test_server.c 319f6b1a99bab5f7149387442243d6e65a8ab4eb
-F src/test_tclvar.c 160290ba5c19964da7cb97defc6c104712074b69
-F src/tokenize.c 3a3fd71cfb2abb8e11ed6ab6b764b790c534defc
+F src/test_tclvar.c b2d1115e4d489179d3f029e765211b2ad527ba59
+F src/tokenize.c e39527c9c867774a92716c669a48ad8fbc3cdc63
 F src/trigger.c dccc6fbf37d12193c90ede5b026bbd195d505ff4
 F src/update.c e89b980b443d44b68bfc0b1746cdb6308e049ac9
 F src/utf.c 853f97ce0d3cff8dbaef517a6dc475f7001a67c5
-F src/util.c 0273ba16dbf9bab423b1b84c6d548d8f14c25f64
-F src/vacuum.c f45bd9d3aad8d68bb3b85cf89d7a797be5075fde
-F src/vdbe.c b5cd895a0516466daacc564da332589a903e2eb0
+F src/util.c 23251cee7867dfdcc80b05d278dbca71586d95cf
+F src/vacuum.c 318ccae7c4e3ddf241aeaee4d2611bfe1949a373
+F src/vdbe.c f1a9a29da48ccfa49042df478abb478520589f37
 F src/vdbe.h 001c5b257567c1d3de7feb2203aac71d0d7b16a3
 F src/vdbeInt.h 8e360d326328e7a66100f468697edf9cfb4567dc
-F src/vdbeapi.c ddfe341249929b89c47a0ff77f8043ef0987612b
-F src/vdbeaux.c d2e8a63e9aea8527c79ae523036cc8f762b267a2
+F src/vdbeapi.c ffd28fa0f731467a1e63155abc74cd149e57d671
+F src/vdbeaux.c 14b48bfc6334682e5e5858a0835f8b00d8751953
 F src/vdbeblob.c cf9ee3c7d9977cbd896f8b118da4fb4268637f4f
 F src/vdbefifo.c 334c838c8f42d61a94813d136019ee566b5dc2f6
-F src/vdbemem.c 019952d44066a24aef70ca8c284cfd2d1073c398
+F src/vdbemem.c 2843e6f91e8f19cfd72cfc7b24a03f1647db3c28
 F src/vtab.c ee29237ecc9b310dc43c0c2ac5caa6c6a20787be
 F src/where.c 2776a0caf8cbbfd6ec79cfb1cd9bc25074055e5e
 F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
@@ -557,7 +557,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 1315bd8e125602275fb718780f9b2730bd37f6ab
-R d4fae6ff2f91391abff6a85b93359df7
+P 6cf725d212d468cbd7c7cbc22ca5ab13f1d77939
+R bc41d2a41155d3978aad1298f4dc479f
 U drh
-Z bdcd45a572300c8ecdfe8272f9cd3707
+Z 6fdad79122af6697e52d8395a5ab70ee
index 22f6e24af5a91b97e327941223d5ece85800f3a9..33169c481e0f3b72f164f513e03641fabafdb0da 100644 (file)
@@ -1 +1 @@
-6cf725d212d468cbd7c7cbc22ca5ab13f1d77939
\ No newline at end of file
+fbbd5bda544ffec4e1b43407b12e546235dc7873
\ No newline at end of file
index 4629ebac92567681523e4ff68ca8f20b9acc732f..33fe92c87349daa2bdde99f72f52843a2e97bb58 100644 (file)
@@ -16,7 +16,7 @@
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.69 2007/08/18 10:59:20 danielk1977 Exp $
+** $Id: date.c,v 1.70 2007/08/21 10:44:16 drh Exp $
 **
 ** SQLite processes all times and dates as Julian Day numbers.  The
 ** dates and times are stored as the number of days since noon
@@ -46,7 +46,6 @@
 **      Richmond, Virginia (USA)
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 #include <stdlib.h>
 #include <assert.h>
index b3aa5da803a54ab8af9d445c8fb58fdf861117e2..699ef172420091d15123117b6900efe2603d3521 100644 (file)
 ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: func.c,v 1.166 2007/08/16 10:36:34 danielk1977 Exp $
+** $Id: func.c,v 1.167 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
-/* #include <math.h> */
 #include <stdlib.h>
 #include <assert.h>
 #include "vdbeInt.h"
-#include "os.h"
 
 
 /*
index 5dff806d1716ee5fda25ad72e8145f249cb4998c..acb169470795d99b63391f4af1f9a55f91ebc8f0 100644 (file)
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: legacy.c,v 1.19 2007/08/16 04:30:40 drh Exp $
+** $Id: legacy.c,v 1.20 2007/08/21 10:44:16 drh Exp $
 */
 
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 
 /*
index 4f6e3b3dbdba44405dbd1016be9594a4d8745978..f2d93907f164df496de762db7a2fcfc48961ec2b 100644 (file)
@@ -17,7 +17,6 @@
 #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */
 #include "sqlite3ext.h"
 #include "sqliteInt.h"
-#include "os.h"
 #include <string.h>
 #include <ctype.h>
 
index f0bbe7da0f8c8f0a5d38bb290dbac811d4c4b1af..719ecb634ba2558b88a1bb06898d776b0fdb9248 100644 (file)
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.389 2007/08/20 22:48:42 drh Exp $
+** $Id: main.c,v 1.390 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 
 /*
index adafe3daf9ce3ddd7f64e938fe737814101ae85c..3f9466cb73ec9184ed08fb22dafdee9e2e9f00bf 100644 (file)
 ** Memory allocation functions used throughout sqlite.
 **
 **
-** $Id: malloc.c,v 1.6 2007/08/16 10:09:03 danielk1977 Exp $
+** $Id: malloc.c,v 1.7 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <stdarg.h>
 #include <ctype.h>
 
index 619a1afc48e29de903f1355a5ede9b78587e5b37..db2e33ed06e0c7e2f9bd2047e96c7b6783e3240c 100644 (file)
 ** This file contains the C functions that implement mutexes for
 ** use by the SQLite core.
 **
-** $Id: mutex.c,v 1.5 2007/08/20 22:48:43 drh Exp $
+** $Id: mutex.c,v 1.6 2007/08/21 10:44:16 drh Exp $
 */
-
 /*
 ** If SQLITE_MUTEX_APPDEF is defined, then this whole module is
-** omitted and equivalent functionality just be provided by the
+** omitted and equivalent functionality must be provided by the
 ** application that links against the SQLite library.
 */
 #ifndef SQLITE_MUTEX_APPDEF
 
-/*
-** The start of real code
+
+/* This is the beginning of real code
 */
 #include "sqliteInt.h"
 
+/*
+** Figure out what version of the code to use
+*/
+#define SQLITE_MUTEX_NOOP 1   /* The default */
+#if 0
+#if defined(SQLITE_DEBUG) && !SQLITE_THREADSAFE
+# undef SQLITE_MUTEX_NOOP
+# define SQLITE_MUTEX_NOOP_DEBUG
+#endif
+#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_UNIX
+# undef SQLITE_MUTEX_NOOP
+# define SQLITE_MUTEX_PTHREAD
+#endif
+#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_WIN
+# undef SQLITE_MUTEX_NOOP
+# define SQLITE_MUTEX_WIN
+#endif
+#endif
+
+
+
+#ifdef SQLITE_MUTEX_NOOP
 /************************ No-op Mutex Implementation **********************
 **
 ** This first implementation of mutexes is really a no-op.  In other words,
@@ -81,51 +102,128 @@ int sqlite3_mutex_held(sqlite3_mutex *pNotUsed){
 int sqlite3_mutex_notheld(sqlite3_mutex *pNotUsed){
   return 1;
 }
+#endif /* SQLITE_MUTEX_NOOP */
 
-#if 0
-/**************** Non-recursive Pthread Mutex Implementation *****************
+#ifdef SQLITE_MUTEX_NOOP_DEBUG
+/*************** Error-checking No-op Mutex Implementation *******************
 **
-** This implementation of mutexes is built using a version of pthreads that
-** does not have native support for recursive mutexes.
+** In this implementation, mutexes do not provide any mutual exclusion.
+** But the error checking is provided.  This implementation is useful
+** for test purposes.
 */
 
 /*
-** Each recursive mutex is an instance of the following structure.
+** The mutex object
 */
-struct RMutex {
-  int recursiveMagic;         /* Magic number identifying this as recursive */
-  int nRef;                   /* Number of entrances */
-  pthread_mutex_t auxMutex;   /* Mutex controlling access to nRef and owner */
-  pthread_mutex_t mainMutex;  /* Mutex controlling the lock */
-  pthread_t owner;            /* Thread that is within this mutex */
+struct sqlite3_mutex {
+  int id;
+  int cnt;
 };
 
 /*
-** Each fast mutex is an instance of the following structure
+** The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it.  If it returns NULL
+** that means that a mutex could not be allocated. 
 */
-struct FMutex {
-  int fastMagic;          /* Identifies this as a fast mutex */
-  pthread_mutex_t mutex;  /* The actual underlying mutex */
-};
+sqlite3_mutex *sqlite3_mutex_alloc(int id){
+  static sqlite3_mutex aStatic[3];
+  sqlite3_mutex *pNew = 0;
+  switch( id ){
+    case SQLITE_MUTEX_FAST:
+    case SQLITE_MUTEX_RECURSIVE: {
+      pNew = sqlite3_malloc(sizeof(*pNew));
+      if( pNew ){
+        pNew->id = id;
+        pNew->cnt = 0;
+      }
+      break;
+    }
+    default: {
+      pNew = &aStatic[id-SQLITE_MUTEX_STATIC_MASTER];
+      pNew->id = id;
+      break;
+    }
+  }
+  return pNew;
+}
 
 /*
-** Either of the above
+** This routine deallocates a previously allocated mutex.
 */
-union AnyMutex {
-  struct RMutex r;
-  struct FMutex f;
-};
+void sqlite3_mutex_free(sqlite3_mutex *p){
+  assert( p );
+  assert( p->cnt==0 );
+  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
+  sqlite3_free(p);
+}
 
 /*
-** Magic numbers
+** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
+** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
+** be entered multiple times by the same thread.  In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.  If the same thread tries to enter any other kind of mutex
+** more than once, the behavior is undefined.
 */
-#define SQLITE_MTX_RECURSIVE   0x4ED886ED
-#define SQLITE_MTX_STATIC      0x56FCE1B4
-#define SQLITE_MTX_FAST        0x245BFD4F
+void sqlite3_mutex_enter(sqlite3_mutex *p){
+  assert( p );
+  assert( p->cnt==0 || p->id==SQLITE_MUTEX_RECURSIVE );
+  p->cnt++;
+}
+int sqlite3_mutex_try(sqlite3_mutex *p){
+  assert( p );
+  if( p->cnt>0 && p->id!=SQLITE_MUTEX_RECURSIVE ){
+    return SQLITE_BUSY;
+  }
+  p->cnt++;
+  return SQLITE_OK;
+}
 
 /*
-** Static mutexes
+** The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.  The behavior
+** is undefined if the mutex is not currently entered or
+** is not currently allocated.  SQLite will never do either.
 */
+void sqlite3_mutex_leave(sqlite3_mutex *p){
+  assert( p->cnt>0 );
+  p->cnt--;
+}
+
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use inside assert() statements.
+*/
+int sqlite3_mutex_held(sqlite3_mutex *p){
+  return p==0 || p->cnt>0;
+}
+int sqlite3_mutex_notheld(sqlite3_mutex *p){
+  return p==0 || p->cnt==0;
+}
+#endif /* SQLITE_MUTEX_NOOP_DEBUG */
+
+
+
+#ifdef SQLITE_MUTEX_PTHREAD
+/**************** Non-recursive Pthread Mutex Implementation *****************
+**
+** This implementation of mutexes is built using a version of pthreads that
+** does not have native support for recursive mutexes.
+*/
+
+/*
+** Each recursive mutex is an instance of the following structure.
+*/
+struct sqlite3_mutex {
+  pthread_mutex_t mainMutex;  /* Mutex controlling the lock */
+  pthread_mutex_t auxMutex;   /* Mutex controlling access to nRef and owner */
+  int id;                     /* Mutex type */
+  int nRef;                   /* Number of entrances */
+  pthread_t owner;            /* Thread that is within this mutex */
+};
 
 /*
 ** The sqlite3_mutex_alloc() routine allocates a new
@@ -167,35 +265,34 @@ union AnyMutex {
 ** the same type number.
 */
 sqlite3_mutex *sqlite3_mutex_alloc(int iType){
-  static struct FMutex staticMutexes[] = {
-    { SQLITE_MTX_STATIC, PTHREAD_MUTEX_INITIALIZER },
-    { SQLITE_MTX_STATIC, PTHREAD_MUTEX_INITIALIZER },
-    { SQLITE_MTX_STATIC, PTHREAD_MUTEX_INITIALIZER },
+  static sqlite3_mutex staticMutexes[] = {
+    { PTHREAD_MUTEX_INITIALIZER, },
+    { PTHREAD_MUTEX_INITIALIZER, },
+    { PTHREAD_MUTEX_INITIALIZER, },
   };
   sqlite3_mutex *p;
   switch( iType ){
     case SQLITE_MUTEX_FAST: {
-      struct FMutex *px = sqlite3_malloc( sizeof(*px) );
-      if( px ){
-        px->fastMagic = SQLITE_MTX_FAST;
-        pthread_mutex_init(&px->mutex, 0);
+      p = sqlite3MallocZero( sizeof(*p) );
+      if( p ){
+        p->id = iType;
+        pthread_mutex_init(&px->mainMutex, 0);
       }
-      p = (sqlite3_mutex*)px;
       break;
     }
     case SQLITE_MUTEX_RECURSIVE: {
-      struct RMutex *px = sqlite3_malloc( sizeof(*px) );
-      if( px ){
-        px->recursiveMagic = SQLITE_MTX_RECURSIVE;
+      p = sqlite3_malloc( sizeof(*p) );
+      if( p ){
+        px->id = iType;
         pthread_mutex_init(&px->auxMutex, 0);
         pthread_mutex_init(&px->mainMutex, 0);
         px->nRef = 0;
       }
-      p = (sqlite3_mutex*)px;
       break;
     }
     default: {
       p = &staticMutexes[iType-2];
+      p->id = iType;
       break;
     }
   }
@@ -208,18 +305,17 @@ sqlite3_mutex *sqlite3_mutex_alloc(int iType){
 ** allocated mutex.  SQLite is careful to deallocate every
 ** mutex that it allocates.
 */
-void sqlite3_mutex_free(sqlite3_mutex *pMutex){
-  int iType = *(int*)pMutex;
-  if( iType==SQLITE_MTX_FAST ){
-    struct FMutex *p = (struct FMutex*)pMutex;
-    pthread_mutex_destroy(&p->mutex);
-    sqlite3_free(p);
-  }else if( iType==SQLITE_MTX_RECURSIVE ){
-    struct RMutex *p = (struct RMutex*)pMutex;
+void sqlite3_mutex_free(sqlite3_mutex *p){
+  assert( p );
+  assert( p->nRef==0 );
+  if( p->id==SQLITE_MUTEX_FAST ){
+    pthread_mutex_destroy(&p->mainMutex);
+  }else{
+    assert( p->id==SQLITE_MUTEX_RECURSIVE );
     pthread_mutex_destroy(&p->auxMutex);
     pthread_mutex_destroy(&p->mainMutex);
-    sqlite3_free(p);
   }
+  sqlite3_free(p);
 }
 
 /*
@@ -233,12 +329,8 @@ void sqlite3_mutex_free(sqlite3_mutex *pMutex){
 ** can enter.  If the same thread tries to enter any other kind of mutex
 ** more than once, the behavior is undefined.
 */
-void sqlite3_mutex_enter(sqlite3_mutex *pMutex){
-  if( SQLITE_MTX_FAST == *(int*)pMutex ){
-    struct FMutex *p = (struct FMutex*)pMutex;
-    pthread_mutex_lock(&p->mutex);
-  }else{
-    struct RMutex *p = (struct RMutex*)pMutex;
+void sqlite3_mutex_enter(sqlite3_mutex *p){
+  if( p->id==SQLITE_MUTEX_RECURSIVE ){
     while(1){
       pthread_mutex_lock(&p->auxMutex);
       if( p->nRef==0 ){
@@ -257,16 +349,15 @@ void sqlite3_mutex_enter(sqlite3_mutex *pMutex){
         pthread_mutex_unlock(&p->mainMutex);
       }
     }
+  }else{
+    assert( p->nRef==0 || pthread_equal(p->owner, pthread_self())==0 );
+    pthread_mutex_lock(&p->mutex);
+    assert( (p->nRef = 1)!=0 );
+    assert( (p->owner = pthread_self())==pthread_self() );
   }
 }
-int sqlite3_mutex_try(sqlite3_mutex *pMutex){
-  if( SQLITE_MTX_FAST == *(int*)pMutex ){
-    struct FMutex *p = (struct FMutex*)pMutex;
-    if( pthread_mutex_trylock(&p->mutex) ){
-      return SQLITE_BUSY;
-    }
-  }else{
-    struct RMutex *p = (struct RMutex*)pMutex;
+int sqlite3_mutex_try(sqlite3_mutex *p){
+  if( p->id==SQLITE_MUTEX_RECURSIVE ){
     pthread_mutex_lock(&p->auxMutex);
     if( p->nRef==0 ){
       p->nRef++;
@@ -280,28 +371,36 @@ int sqlite3_mutex_try(sqlite3_mutex *pMutex){
       pthread_mutex_unlock(&p->auxMutex);
       return SQLITE_BUSY;
     }
+  }else{
+    assert( p->nRef==0 || pthread_equal(p->owner, pthread_self())==0 );
+    if( pthread_mutex_trylock(&p->mutex) ){
+      return SQLITE_BUSY;
+    }
   }
   return SQLITE_OK;
 }
 
 /*
-** The sqlite3_mutex_exit() routine exits a mutex that was
+** The sqlite3_mutex_leave() routine exits a mutex that was
 ** previously entered by the same thread.  The behavior
 ** is undefined if the mutex is not currently entered or
 ** is not currently allocated.  SQLite will never do either.
 */
 void sqlite3_mutex_leave(sqlite3_mutex *pMutex){
-  if( SQLITE_MTX_FAST == *(int*)pMutex ){
-    struct FMutex *p = (struct FMutex*)pMutex;
-    pthread_mutex_unlock(&p->mutex);
-  }else{
-    struct RMutex *p = (struct RMutex*)pMutex;
+  if( p->id==SQLITE_MUTEX_RECURSIVE ){
     pthread_mutex_lock(&p->auxMutex);
+    assert( p->nRef>0 );
+    assert( pthread_equal(p->owner, pthread_self()) );
     p->nRef--;
     if( p->nRef<=0 ){
       pthread_mutex_unlock(&p->mainMutex);
     }
     pthread_mutex_unlock(&p->auxMutex);
+  }else{
+    assert( p->nRef==1 );
+    assert( pthread_equal(p->owner, pthread_self()) );
+    p->nRef = 0;
+    pthread_mutex_unlock(&p->mutex);
   }
 }
 
@@ -309,12 +408,14 @@ void sqlite3_mutex_leave(sqlite3_mutex *pMutex){
 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
 ** intended for use inside assert() statements.
 */
-int sqlite3_mutex_held(sqlite3_mutex *pNotUsed){
-  return 1;
+int sqlite3_mutex_held(sqlite3_mutex *p){
+  assert( p );
+  return p==0 || (p->nRef!=0 && pthread_equal(p->owner, pthread_self()));
 }
 int sqlite3_mutex_notheld(sqlite3_mutex *pNotUsed){
-  return 1;
+  assert( p );
+  return p==0 || p->nRef==0 || pthread_equal(p->owner, pthread_self())==0;
 }
-#endif /* non-recursive pthreads */
+#endif /* SQLITE_MUTEX_PTHREAD */
 
 #endif /* !defined(SQLITE_MUTEX_APPDEF) */
index aeafb26da0418ce4d3f2ba8bb5005ca98f30d0e3..90dd4a39aa6c66dfbf2c96587ca90b6a5d2e778e 100644 (file)
--- a/src/os.c
+++ b/src/os.c
@@ -15,7 +15,6 @@
 */
 #define _SQLITE_OS_C_ 1
 #include "sqliteInt.h"
-#include "os.h"
 #undef _SQLITE_OS_C_
 
 /*
index 7dfcda6dba690c3efe742d7b0ae68feb097a3ed7..0f6c782c2e05655ecd8c6504a407952dbc131799 100644 (file)
--- a/src/os.h
+++ b/src/os.h
 ** This header file (together with is companion C source-code file
 ** "os.c") attempt to abstract the underlying operating system so that
 ** the SQLite library will work on both POSIX and windows systems.
+**
+** This header file is #include-ed by sqliteInt.h and thus ends up
+** being included by every source file.
 */
 #ifndef _SQLITE_OS_H_
 #define _SQLITE_OS_H_
 
 /*
 ** Figure out if we are dealing with Unix, Windows, or some other
-** operating system.
+** operating system.  After the following block of preprocess macros,
+** all of OS_UNIX, OS_WIN, OS_OS2, and OS_OTHER will defined to either
+** 1 or 0.  One of the four will be 1.  The other three will be 0.
 */
 #if defined(OS_OTHER)
 # if OS_OTHER==1
@@ -60,6 +65,7 @@
 #endif
 
 
+
 /*
 ** Define the maximum size of a temporary filename
 */
index 45d796bdf2430337eee0f8fc968fea0f4fe3e0af..66f19fb460906ff6c3890697c3f8e1c7d277b6ac 100644 (file)
@@ -14,7 +14,6 @@
 */
 
 #include "sqliteInt.h"
-#include "os.h"
 
 #if OS_OS2
 
index 0544e071c0d16ebc1860243aa010330d2c2ba92d..a268f28bce6470815d3f844e5fb1a067734cf6f2 100644 (file)
@@ -13,7 +13,6 @@
 ** This file contains code that is specific to Unix systems.
 */
 #include "sqliteInt.h"
-#include "os.h"
 #if OS_UNIX              /* This file is used on unix only */
 
 /* #define SQLITE_ENABLE_LOCKING_STYLE 0 */
index 9ebb9dc3044f5bec870b9e2952991404545210a7..66bf4f6b60f823d1f998817f46c4a8c8aa443f68 100644 (file)
@@ -13,7 +13,6 @@
 ** This file contains code that is specific to windows.
 */
 #include "sqliteInt.h"
-#include "os.h"
 #if OS_WIN               /* This file is used for windows only */
 
 #include <winbase.h>
index 871023eb92b33a1168a37396edd4db962c341d18..f13f34c920a95231cf9d1189aefef236055a689b 100644 (file)
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.362 2007/08/20 16:07:01 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.363 2007/08/21 10:44:16 drh Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
-#include "os.h"
-#include "pager.h"
 #include <assert.h>
 #include <string.h>
 
index a051b64a93e11a973db6de3ef0ac9d69d75e2e8b..5077daf31b87ed7700dc7bc5d4e7004288f5f6f8 100644 (file)
@@ -14,7 +14,7 @@
 ** the parser.  Lemon will also generate a header file containing
 ** numeric codes for all of the tokens.
 **
-** @(#) $Id: parse.y,v 1.233 2007/08/16 10:09:03 danielk1977 Exp $
+** @(#) $Id: parse.y,v 1.234 2007/08/21 10:44:16 drh Exp $
 */
 
 // All token codes are small integers with #defines that begin with "TK_"
@@ -55,7 +55,6 @@
 //
 %include {
 #include "sqliteInt.h"
-#include "parse.h"
 
 /*
 ** An instance of this structure holds information about the
index f5ed28a4e089e9c0f4cbbea9a1e9e6e0bae27883..13eee4848550985f768ef8ad4d12a5b936d55774 100644 (file)
 *************************************************************************
 ** This file contains code used to implement the PRAGMA command.
 **
-** $Id: pragma.c,v 1.145 2007/08/17 15:53:37 danielk1977 Exp $
+** $Id: pragma.c,v 1.146 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 
 /* Ignore this whole file if pragmas are disabled
 */
 #if !defined(SQLITE_OMIT_PRAGMA) && !defined(SQLITE_OMIT_PARSER)
 
-#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
-# include "pager.h"
-# include "btree.h"
-#endif
-
 /*
 ** Interpret the given string as a safety level.  Return 0 for OFF,
 ** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
index 256a3e27ad907a7dde0e3ac628c56719f09d79e0..376fd4e9b6ec9a204c48971a8726ae5a1ee8db1f 100644 (file)
 ** interface, and routines that contribute to loading the database schema
 ** from disk.
 **
-** $Id: prepare.c,v 1.54 2007/08/16 10:09:03 danielk1977 Exp $
+** $Id: prepare.c,v 1.55 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 
 /*
index 58aa07d801fc9d5bbe315c5018d617590149bacf..6443a01e0d8f259f75a77c3761a9da64b82ce798 100644 (file)
 ** Random numbers are used by some of the database backends in order
 ** to generate random integer keys for tables or random filenames.
 **
-** $Id: random.c,v 1.18 2007/08/20 22:48:43 drh Exp $
+** $Id: random.c,v 1.19 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 
 
 /*
index d3fbc375a921c5104ebe39b1044e1a5af58b2ddd..c462900cdedff50dfe5c58ade35e9537197670c9 100644 (file)
@@ -12,7 +12,7 @@
 ** A TCL Interface to SQLite.  Append this file to sqlite3.c and
 ** compile the whole thing to build a TCL-enabled version of SQLite.
 **
-** $Id: tclsqlite.c,v 1.195 2007/08/15 19:16:43 drh Exp $
+** $Id: tclsqlite.c,v 1.196 2007/08/21 10:44:16 drh Exp $
 */
 #include "tcl.h"
 #include <errno.h>
@@ -23,7 +23,6 @@
 */
 #ifndef SQLITE_AMALGAMATION
 # include "sqliteInt.h"
-# include "hash.h"
 # include <stdlib.h>
 # include <string.h>
 # include <assert.h>
index d46be4526eb5295201db2d247de7f835c01890c8..d04d8f67ea8774c28dbe575f8c325497771cb0c9 100644 (file)
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test1.c,v 1.265 2007/08/20 22:48:43 drh Exp $
+** $Id: test1.c,v 1.266 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #include <stdlib.h>
 #include <string.h>
 
index 676b188baa2815737773c849122a95a599151fc7..9480f8f7f91d6013aeea36a3cc5a8ebb531c7737 100644 (file)
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test2.c,v 1.49 2007/08/20 22:48:43 drh Exp $
+** $Id: test2.c,v 1.50 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
-#include "pager.h"
 #include "tcl.h"
 #include <stdlib.h>
 #include <string.h>
index 99f555bcb7b8c4636411121a3609815c761dffba..3a1191fd594c8a9fe4b234f52c4d8281ff1ae263 100644 (file)
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test3.c,v 1.79 2007/08/20 23:50:25 drh Exp $
+** $Id: test3.c,v 1.80 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "pager.h"
-#include "btree.h"
 #include "tcl.h"
 #include <stdlib.h>
 #include <string.h>
index 221db0fb401d6145f642240c9cbb20350330a224..57ea1bed634197de526357ddac008fd272948e19 100644 (file)
 *************************************************************************
 ** Code for testing the the SQLite library in a multithreaded environment.
 **
-** $Id: test4.c,v 1.19 2007/08/20 22:48:43 drh Exp $
+** $Id: test4.c,v 1.20 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #if defined(OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE
 #include <stdlib.h>
 #include <string.h>
index b9e69d272cdf0057796419ed9f6f1ddf3aa32f68..88831b79cd5daee35123bab294c4337ce9881f1e 100644 (file)
 ** is used for testing the SQLite routines for converting between
 ** the various supported unicode encodings.
 **
-** $Id: test5.c,v 1.18 2007/08/16 10:09:03 danielk1977 Exp $
+** $Id: test5.c,v 1.19 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
-#include "os.h"         /* to get SQLITE_BIGENDIAN */
 #include "tcl.h"
 #include <stdlib.h>
 #include <string.h>
index df7418f09140f9fca39ea392841746d845692c06..db20725ed43869c2851659892eebfe36d697a10b 100644 (file)
@@ -16,7 +16,6 @@
 */
 #if SQLITE_TEST          /* This file is used for the testing only */
 #include "sqliteInt.h"
-#include "os.h"
 #include "tcl.h"
 
 #ifndef SQLITE_OMIT_DISKIO  /* This file is a no-op if disk I/O is disabled */
index f3411f90a7f1f2e09085e2bae8ddaf3301ed4b6b..15ebce371f832d55b6cbc695e01335eff38516ae 100644 (file)
 ** Code for testing the client/server version of the SQLite library.
 ** Derived from test4.c.
 **
-** $Id: test7.c,v 1.6 2007/08/20 22:48:43 drh Exp $
+** $Id: test7.c,v 1.7 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 
 /*
 ** This test only works on UNIX with a SQLITE_THREADSAFE build that includes
index 70c6c57f119eee6890a439122b48d3bd0593b3dd..28a49a75fc4342881664a0db68bc97b8c962f484 100644 (file)
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test8.c,v 1.51 2007/08/16 11:36:15 danielk1977 Exp $
+** $Id: test8.c,v 1.52 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #include <stdlib.h>
 #include <string.h>
 
index f2ba5e7f66fc131376852052fe81f3795f06c19f..1e92245fff61141a056f02d16f5d17a7f49a3fcb 100644 (file)
 ** for completeness. Test code is written in C for these cases
 ** as there is not much point in binding to Tcl.
 **
-** $Id: test9.c,v 1.3 2007/04/23 23:56:32 drh Exp $
+** $Id: test9.c,v 1.4 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #include <stdlib.h>
 #include <string.h>
 
index ead84429711097e47b820f6478a0d5182ef5761b..6527f1b09bafb7d7b080f7c2d7e13fdceca6c5b7 100644 (file)
@@ -71,7 +71,6 @@
 */
 
 #include "sqliteInt.h"
-#include "os.h"
 #include <tcl.h>
 
 /*
index fb2b963dce1767271a0e1e155689e8b1d2bd9d4c..17c1c584b3dc7dc9abcd8464ba123d96cb4f506e 100644 (file)
 ** The focus of this file is providing the TCL testing layer
 ** access to compile-time constants.
 **
-** $Id: test_config.c,v 1.10 2007/08/20 23:50:25 drh Exp $
+** $Id: test_config.c,v 1.11 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #include <stdlib.h>
 #include <string.h>
 
index 03e2ca64afdf4b9cc5cb89768c9a96b61a9991bc..63f262d8ffa0f8d60beed1c9c1e10794e65392bb 100644 (file)
 ** The emphasis of this file is a virtual table that provides
 ** access to TCL variables.
 **
-** $Id: test_tclvar.c,v 1.13 2007/08/16 11:36:15 danielk1977 Exp $
+** $Id: test_tclvar.c,v 1.14 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
-#include "os.h"
 #include <stdlib.h>
 #include <string.h>
 
index 774166d7fef79f4baab209f884d1fe793f9e9a38..5005fe1b5995941fb0bdbe2b6c1f0e5949339c9d 100644 (file)
 ** individual tokens and sends those tokens one-by-one over to the
 ** parser for analysis.
 **
-** $Id: tokenize.c,v 1.133 2007/08/16 10:09:03 danielk1977 Exp $
+** $Id: tokenize.c,v 1.134 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 #include <stdlib.h>
 
index 975aa19ba6b4770688e918f5a5100126cbe112f2..694d7da0b825ee0bb4f224ee03fad1a937d5b688 100644 (file)
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: util.c,v 1.209 2007/08/16 10:09:03 danielk1977 Exp $
+** $Id: util.c,v 1.210 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <stdarg.h>
 #include <ctype.h>
 
index ee0567f174f8e9d396299c9174b9d87eeca596c6..8be688d44c901f47a97ef6a9fbda6491a3bb89ca 100644 (file)
 ** Most of the code in this file may be omitted by defining the
 ** SQLITE_OMIT_VACUUM macro.
 **
-** $Id: vacuum.c,v 1.70 2007/08/16 04:30:40 drh Exp $
+** $Id: vacuum.c,v 1.71 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
-#include "os.h"
 
 #if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
 /*
index 6b12c5f93865402d4b759a166a1f2dcc142c91bd..80b77615d91f458d2afc48f27174839f0de4fbb2 100644 (file)
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.642 2007/08/17 15:53:37 danielk1977 Exp $
+** $Id: vdbe.c,v 1.643 2007/08/21 10:44:16 drh Exp $
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 #include <math.h>
 #include "vdbeInt.h"
index e8d9ddad560b02873bddabba80a4f3a65d6a6265..1226956080ba60d549552be92e65ea40255715de 100644 (file)
@@ -15,7 +15,6 @@
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
-#include "os.h"
 
 /*
 ** Return TRUE (non-zero) of the statement supplied as an argument needs
index 206fd0fda48a8553b1ddcf528540b831f8bbe08e..5eb9d22a6f031cf3b27b6b84b6c402f352122f6d 100644 (file)
@@ -15,7 +15,6 @@
 ** But that file was getting too big so this subroutines were split out.
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <ctype.h>
 #include "vdbeInt.h"
 
index 53b78c28fdba456a9d8aa86f67712d56fc8ae7f0..ad911fa0e751942e8789e97a4b228a92337f65e9 100644 (file)
@@ -16,7 +16,6 @@
 ** name sqlite_value
 */
 #include "sqliteInt.h"
-#include "os.h"
 #include <math.h>
 #include <ctype.h>
 #include "vdbeInt.h"