Browse Source

modify the RTT is abbreviated error, change to be rtthread.

geniusgogo 11 years ago
parent
commit
b3e70cbf40

+ 10 - 10
components/external/SQLite-3.8.1/make/Makefile

@@ -27,7 +27,7 @@ BCC = gcc  -g
 # same unless your are cross-compiling.)
 #
 TCC = arm-none-eabi-gcc   -g -O2 \
-    -DSQLITE_OS_OTHER=1 -DSQLITE_OS_RTT=1 \
+    -DSQLITE_OS_OTHER=1 -DSQLITE_OS_RTTHREAD=1 \
     -I. -I${TOP}/src -I${TOP}/ext/rtree     \
     -I../../../../include                   \
     -I../../../../components/dfs/include    \
@@ -82,7 +82,7 @@ TEMP_STORE = -DSQLITE_TEMP_STORE=1
 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).  
 # The same set of OMIT and ENABLE flags should be passed to the 
 # LEMON parser generator and the mkkeywordhash tool as well.
-OPT_FEATURE_FLAGS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_RTT_NO_WIDE=1   \
+OPT_FEATURE_FLAGS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_RTTHREAD_NO_WIDE=1   \
     -DSQLITE_OMIT_WAL -DSQLITE_ENABLE_LOCKING_STYLE=0 \
     -DSQLITE_DISABLE_LOCKING_STYLE=1
 
@@ -182,8 +182,8 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
          icu.lo insert.lo journal.lo legacy.lo loadext.lo \
          main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
          memjournal.lo \
-         mutex.lo mutex_noop.lo mutex_rtt.lo \
-         notify.lo opcodes.lo os.lo os_rtt.lo \
+         mutex.lo mutex_noop.lo mutex_rtthread.lo \
+         notify.lo opcodes.lo os.lo os_rtthread.lo \
          pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
          random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
          table.lo tokenize.lo trigger.lo \
@@ -242,12 +242,12 @@ SRC = \
   $(TOP)/src/mutex.c \
   $(TOP)/src/mutex.h \
   $(TOP)/src/mutex_noop.c \
-  $(TOP)/src/mutex_rtt.c \
+  $(TOP)/src/mutex_rtthread.c \
   $(TOP)/src/notify.c \
   $(TOP)/src/os.c \
   $(TOP)/src/os.h \
   $(TOP)/src/os_common.h \
-  $(TOP)/src/os_rtt.c \
+  $(TOP)/src/os_rtthread.c \
   $(TOP)/src/pager.c \
   $(TOP)/src/pager.h \
   $(TOP)/src/parse.y \
@@ -683,8 +683,8 @@ mutex.lo:	$(TOP)/src/mutex.c $(HDR)
 mutex_noop.lo:	$(TOP)/src/mutex_noop.c $(HDR)
 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_noop.c
 
-mutex_rtt.lo:	$(TOP)/src/mutex_rtt.c $(HDR)
-	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_rtt.c
+mutex_rtthread.lo:	$(TOP)/src/mutex_rtthread.c $(HDR)
+	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_rtthread.c
 
 notify.lo:	$(TOP)/src/notify.c $(HDR)
 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/notify.c
@@ -701,8 +701,8 @@ pcache1.lo:	$(TOP)/src/pcache1.c $(HDR) $(TOP)/src/pcache.h
 os.lo:	$(TOP)/src/os.c $(HDR)
 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os.c
 
-os_rtt.lo:$(TOP)/src/os_rtt.c $(HDR)
-	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_rtt.c
+os_rtthread.lo:$(TOP)/src/os_rtthread.c $(HDR)
+	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_rtthread.c
 
 pragma.lo:	$(TOP)/src/pragma.c $(HDR)
 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pragma.c

+ 1 - 1
components/external/SQLite-3.8.1/src/mem1.c

@@ -75,7 +75,7 @@ static malloc_zone_t* _sqliteZone_;
 #define SQLITE_MALLOCSIZE(x) \
         (_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))
 
-#elif defined(SQLITE_OS_RTT)
+#elif defined(SQLITE_OS_RTTHREAD)
 #include <rtthread.h>
 /*
 ** Use standard C library malloc and free on non-Apple systems.

+ 3 - 3
components/external/SQLite-3.8.1/src/mutex.h

@@ -33,7 +33,7 @@
 **                             implementation can be overridden at
 **                             start-time.
 **
-**   SQLITE_MUTEX_RTT          For multi_threaded  applications on rt-thread.
+**   SQLITE_MUTEX_RTTHREAD     For multi-threaded  applications on rt-thread.
 **
 **   SQLITE_MUTEX_PTHREADS     For multi-threaded applications on Unix.
 **
@@ -47,8 +47,8 @@
 #    define SQLITE_MUTEX_PTHREADS
 #  elif SQLITE_OS_WIN
 #    define SQLITE_MUTEX_W32
-#  elif SQLITE_OS_RTT
-#    define SQLITE_MUTEX_RTT
+#  elif SQLITE_OS_RTTHREAD
+#    define SQLITE_MUTEX_RTTHREAD
 #  else
 #    define SQLITE_MUTEX_NOOP
 #  endif

+ 28 - 28
components/external/SQLite-3.8.1/src/mutex_rtt.c → components/external/SQLite-3.8.1/src/mutex_rtthread.c

@@ -20,7 +20,7 @@
 ** Note that this implementation requires a version of rt-thread that
 ** supports recursive mutexes.
 */
-#ifdef SQLITE_MUTEX_RTT
+#ifdef SQLITE_MUTEX_RTTHREAD
 
 #include <rtthread.h>
 
@@ -58,23 +58,23 @@ struct sqlite3_mutex {
 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
 ** intended for use only inside assert() statements.  On some platforms,
 ** there might be race conditions that can cause these routines to
-** deliver incorrect results.  In particular, if rtt_equal() is
+** deliver incorrect results.  In particular, if rtthread_equal() is
 ** not an atomic operation, then these routines might delivery
-** incorrect results.  On most platforms, rtt_equal() is a
+** incorrect results.  On most platforms, rtthread_equal() is a
 ** comparison of two integers and is therefore atomic.  But we are
 ** told that HPUX is not such a platform.  If so, then these routines
 ** will not always work correctly on HPUX.
 **
-** On those platforms where rtt_equal() is not atomic, SQLite
+** On those platforms where rtthread_equal() is not atomic, SQLite
 ** should be compiled without -DSQLITE_DEBUG and with -DNDEBUG to
 ** make sure no assert() statements are evaluated and hence these
 ** routines are never called.
 */
 #if !defined(NDEBUG) || defined(SQLITE_DEBUG)
-static int rttMutexHeld(sqlite3_mutex *p){
+static int rtthreadMutexHeld(sqlite3_mutex *p){
   return (p->nRef != 0 && p->owner == rt_thread_self());
 }
-static int rttMutexNotheld(sqlite3_mutex *p){
+static int rtthreadMutexNotheld(sqlite3_mutex *p){
   return (p->nRef == 0 || p->owner != rt_thread_self());
 }
 #endif
@@ -82,8 +82,8 @@ static int rttMutexNotheld(sqlite3_mutex *p){
 /*
 ** Initialize and deinitialize the mutex subsystem.
 */
-static int rttMutexInit(void){ return SQLITE_OK; }
-static int rttMutexEnd(void){ return SQLITE_OK; }
+static int rtthreadMutexInit(void){ return SQLITE_OK; }
+static int rtthreadMutexEnd(void){ return SQLITE_OK; }
 
 /*
 ** The sqlite3_mutex_alloc() routine allocates a new
@@ -127,7 +127,7 @@ static int rttMutexEnd(void){ return SQLITE_OK; }
 ** mutex types, the same mutex is returned on every call that has
 ** the same type number.
 */
-static sqlite3_mutex *rttMutexAlloc(int iType){
+static sqlite3_mutex* rtthreadMutexAlloc(int iType){
   static sqlite3_mutex staticMutexes[] = {
     SQLITE3_MUTEX_INITIALIZER,
     SQLITE3_MUTEX_INITIALIZER,
@@ -179,7 +179,7 @@ static sqlite3_mutex *rttMutexAlloc(int iType){
 ** allocated mutex.  SQLite is careful to deallocate every
 ** mutex that it allocates.
 */
-static void rttMutexFree(sqlite3_mutex *p){
+static void rtthreadMutexFree(sqlite3_mutex *p){
   assert( p->nRef==0 );
   assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
   rt_mutex_detach(&p->mutex);
@@ -197,12 +197,12 @@ static void rttMutexFree(sqlite3_mutex *p){
 ** can enter.  If the same thread tries to enter any other kind of mutex
 ** more than once, the behavior is undefined.
 */
-static void rttMutexEnter(sqlite3_mutex *p){
-  assert( p->id==SQLITE_MUTEX_RECURSIVE || rttMutexNotheld(p) );
+static void rtthreadMutexEnter(sqlite3_mutex *p){
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || rtthreadMutexNotheld(p) );
 
 #ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
   /* If recursive mutexes are not available, then we have to grow
-  ** our own.  This implementation assumes that rtt_equal()
+  ** our own.  This implementation assumes that rtthread_equal()
   ** is atomic - that it cannot be deceived into thinking self
   ** and p->owner are equal if p->owner changes between two values
   ** that are not equal to self while the comparison is taking place.
@@ -239,13 +239,13 @@ static void rttMutexEnter(sqlite3_mutex *p){
   }
 #endif
 }
-static int rttMutexTry(sqlite3_mutex *p){
+static int rtthreadMutexTry(sqlite3_mutex *p){
   int rc;
-  assert( p->id==SQLITE_MUTEX_RECURSIVE || rttMutexNotheld(p) );
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || rtthreadMutexNotheld(p) );
 
 #ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
   /* If recursive mutexes are not available, then we have to grow
-  ** our own.  This implementation assumes that rtt_equal()
+  ** our own.  This implementation assumes that rtthread_equal()
   ** is atomic - that it cannot be deceived into thinking self
   ** and p->owner are equal if p->owner changes between two values
   ** that are not equal to self while the comparison is taking place.
@@ -296,8 +296,8 @@ static int rttMutexTry(sqlite3_mutex *p){
 ** is undefined if the mutex is not currently entered or
 ** is not currently allocated.  SQLite will never do either.
 */
-static void rttMutexLeave(sqlite3_mutex *p){
-  assert( rttMutexHeld(p) );
+static void rtthreadMutexLeave(sqlite3_mutex *p){
+  assert( rtthreadMutexHeld(p) );
 #if SQLITE_MUTEX_NREF
   p->nRef--;
   if( p->nRef==0 ) p->owner = 0;
@@ -321,16 +321,16 @@ static void rttMutexLeave(sqlite3_mutex *p){
 
 sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
   static const sqlite3_mutex_methods sMutex = {
-    rttMutexInit,
-    rttMutexEnd,
-    rttMutexAlloc,
-    rttMutexFree,
-    rttMutexEnter,
-    rttMutexTry,
-    rttMutexLeave,
+    rtthreadMutexInit,
+    rtthreadMutexEnd,
+    rtthreadMutexAlloc,
+    rtthreadMutexFree,
+    rtthreadMutexEnter,
+    rtthreadMutexTry,
+    rtthreadMutexLeave,
 #ifdef SQLITE_DEBUG
-    rttMutexHeld,
-    rttMutexNotheld
+    rtthreadMutexHeld,
+    rtthreadMutexNotheld
 #else
     0,
     0
@@ -340,5 +340,5 @@ sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
   return &sMutex;
 }
 
-#endif /* SQLITE_MUTEX_RTT */
+#endif /* SQLITE_MUTEX_RTTHREAD */
 

+ 2 - 2
components/external/SQLite-3.8.1/src/os.h

@@ -33,8 +33,8 @@
 #   define SQLITE_OS_UNIX 0
 #   undef SQLITE_OS_WIN
 #   define SQLITE_OS_WIN 0
-#   undef SQLITE_OS_RTT
-#   define SQLITE_OS_RTT 1
+#   undef SQLITE_OS_RTTHREAD
+#   define SQLITE_OS_RTTHREAD 1
 # else
 #   undef SQLITE_OS_OTHER
 # endif

File diff suppressed because it is too large
+ 172 - 172
components/external/SQLite-3.8.1/src/os_rtthread.c


+ 1 - 1
components/external/SQLite-3.8.1/src/sqliteInt.h

@@ -568,7 +568,7 @@ extern const int sqlite3one;
 # endif
 #endif
 #ifndef SQLITE_MAX_MMAP_SIZE
-# if defined(SQLITE_OS_RTT)
+# if defined(SQLITE_OS_RTTHREAD)
 #   define SQLITE_MAX_MMAP_SIZE 0
 # elif defined(__linux__) \
   || defined(_WIN32) \

+ 2 - 2
components/external/SQLite-3.8.1/tool/mksqlite3c.tcl

@@ -245,7 +245,7 @@ foreach file {
    mem5.c
    mutex.c
    mutex_noop.c
-   mutex_rtt.c
+   mutex_rtthread.c
    malloc.c
    printf.c
    random.c
@@ -254,7 +254,7 @@ foreach file {
    hash.c
    opcodes.c
 
-   os_rtt.c
+   os_rtthread.c
 
    bitvec.c
    pcache.c

File diff suppressed because it is too large
+ 167 - 167
components/external/sqlite/sqlite3.c


Some files were not shown because too many files changed in this diff