提交 e0a3ced7 编写于 作者: xpxyr's avatar xpxyr 提交者: geniusgogo

add rtt complie macro SQLITE_OS_RTT

上级 a186d329
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
/* /*
** Figure out if we are dealing with Unix, Windows, or some other ** Figure out if we are dealing with Unix, Windows, or some other
** operating system. After the following block of preprocess macros, ** operating system. After the following block of preprocess macros,
** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, and SQLITE_OS_OTHER ** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, and SQLITE_OS_OTHER
** will defined to either 1 or 0. One of the four will be 1. The other ** will defined to either 1 or 0. One of the four will be 1. The other
** three will be 0. ** three will be 0.
*/ */
#if defined(SQLITE_OS_OTHER) #if defined(SQLITE_OS_OTHER)
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
# define SQLITE_OS_UNIX 0 # define SQLITE_OS_UNIX 0
# undef SQLITE_OS_WIN # undef SQLITE_OS_WIN
# define SQLITE_OS_WIN 0 # define SQLITE_OS_WIN 0
# undef SQLITE_OS_RTT
# define SQLITE_OS_RTT 1
# else # else
# undef SQLITE_OS_OTHER # undef SQLITE_OS_OTHER
# endif # endif
...@@ -125,10 +127,10 @@ ...@@ -125,10 +127,10 @@
** 2006-10-31: The default prefix used to be "sqlite_". But then ** 2006-10-31: The default prefix used to be "sqlite_". But then
** Mcafee started using SQLite in their anti-virus product and it ** Mcafee started using SQLite in their anti-virus product and it
** started putting files with the "sqlite" name in the c:/temp folder. ** started putting files with the "sqlite" name in the c:/temp folder.
** This annoyed many windows users. Those users would then do a ** This annoyed many windows users. Those users would then do a
** Google search for "sqlite", find the telephone numbers of the ** Google search for "sqlite", find the telephone numbers of the
** developers and call to wake them up at night and complain. ** developers and call to wake them up at night and complain.
** For this reason, the default name prefix is changed to be "sqlite" ** For this reason, the default name prefix is changed to be "sqlite"
** spelled backwards. So the temp files are still identified, but ** spelled backwards. So the temp files are still identified, but
** anybody smart enough to figure out the code is also likely smart ** anybody smart enough to figure out the code is also likely smart
** enough to know that calling the developer will not help get rid ** enough to know that calling the developer will not help get rid
...@@ -169,9 +171,9 @@ ...@@ -169,9 +171,9 @@
** UnlockFile(). ** UnlockFile().
** **
** LockFile() prevents not just writing but also reading by other processes. ** LockFile() prevents not just writing but also reading by other processes.
** A SHARED_LOCK is obtained by locking a single randomly-chosen ** A SHARED_LOCK is obtained by locking a single randomly-chosen
** byte out of a specific range of bytes. The lock byte is obtained at ** byte out of a specific range of bytes. The lock byte is obtained at
** random so two separate readers can probably access the file at the ** random so two separate readers can probably access the file at the
** same time, unless they are unlucky and choose the same lock byte. ** same time, unless they are unlucky and choose the same lock byte.
** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range. ** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.
** There can only be one writer. A RESERVED_LOCK is obtained by locking ** There can only be one writer. A RESERVED_LOCK is obtained by locking
...@@ -190,7 +192,7 @@ ...@@ -190,7 +192,7 @@
** The following #defines specify the range of bytes used for locking. ** The following #defines specify the range of bytes used for locking.
** SHARED_SIZE is the number of bytes available in the pool from which ** SHARED_SIZE is the number of bytes available in the pool from which
** a random byte is selected for a shared lock. The pool of bytes for ** a random byte is selected for a shared lock. The pool of bytes for
** shared locks begins at SHARED_FIRST. ** shared locks begins at SHARED_FIRST.
** **
** The same locking strategy and ** The same locking strategy and
** byte ranges are used for Unix. This leaves open the possiblity of having ** byte ranges are used for Unix. This leaves open the possiblity of having
...@@ -206,7 +208,7 @@ ...@@ -206,7 +208,7 @@
** that all locks will fit on a single page even at the minimum page size. ** that all locks will fit on a single page even at the minimum page size.
** PENDING_BYTE defines the beginning of the locks. By default PENDING_BYTE ** PENDING_BYTE defines the beginning of the locks. By default PENDING_BYTE
** is set high so that we don't have to allocate an unused page except ** is set high so that we don't have to allocate an unused page except
** for very large databases. But one should test the page skipping logic ** for very large databases. But one should test the page skipping logic
** by setting PENDING_BYTE low and running the entire regression suite. ** by setting PENDING_BYTE low and running the entire regression suite.
** **
** Changing the value of PENDING_BYTE results in a subtly incompatible ** Changing the value of PENDING_BYTE results in a subtly incompatible
...@@ -230,8 +232,8 @@ ...@@ -230,8 +232,8 @@
*/ */
int sqlite3OsInit(void); int sqlite3OsInit(void);
/* /*
** Functions for accessing sqlite3_file methods ** Functions for accessing sqlite3_file methods
*/ */
int sqlite3OsClose(sqlite3_file*); int sqlite3OsClose(sqlite3_file*);
int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset); int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);
...@@ -255,8 +257,8 @@ int sqlite3OsFetch(sqlite3_file *id, i64, int, void **); ...@@ -255,8 +257,8 @@ int sqlite3OsFetch(sqlite3_file *id, i64, int, void **);
int sqlite3OsUnfetch(sqlite3_file *, i64, void *); int sqlite3OsUnfetch(sqlite3_file *, i64, void *);
/* /*
** Functions for accessing sqlite3_vfs methods ** Functions for accessing sqlite3_vfs methods
*/ */
int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *); int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
int sqlite3OsDelete(sqlite3_vfs *, const char *, int); int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
...@@ -273,7 +275,7 @@ int sqlite3OsSleep(sqlite3_vfs *, int); ...@@ -273,7 +275,7 @@ int sqlite3OsSleep(sqlite3_vfs *, int);
int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*); int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*);
/* /*
** Convenience functions for opening and closing files using ** Convenience functions for opening and closing files using
** sqlite3_malloc() to obtain space for the file-handle structure. ** sqlite3_malloc() to obtain space for the file-handle structure.
*/ */
int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*); int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册