aboutsummaryrefslogtreecommitdiff
path: root/src/os.h
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2005-12-15 10:11:30 +0000
committerdanielk1977 <danielk1977@noemail.net>2005-12-15 10:11:30 +0000
commit13a68c3f61385c5e05e73d976127c1108fd624bb (patch)
treedf063d568da0e892d332d7c02b3090616719c2e7 /src/os.h
parentaf9a7c22b5b25d557eab2f7e1a66a65fde78005d (diff)
downloadsqlite-13a68c3f61385c5e05e73d976127c1108fd624bb.tar.gz
sqlite-13a68c3f61385c5e05e73d976127c1108fd624bb.zip
Add the sqlite3_os_routine_set()/get() functions. (CVS 2818)
FossilOrigin-Name: c1ed79f594fb85009c2e9e5e281cbe66a9d2fa17
Diffstat (limited to 'src/os.h')
-rw-r--r--src/os.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/os.h b/src/os.h
index dc0e8d88c..739c8a95b 100644
--- a/src/os.h
+++ b/src/os.h
@@ -222,8 +222,30 @@ extern struct sqlite3OsVtbl {
int (*xCurrentTime)(double*);
void (*xEnterMutex)(void);
void (*xLeaveMutex)(void);
+ void *(*xThreadSpecificData)(int);
} sqlite3Os;
+
+/*
+** The semi-published API for setting and getting methods from the
+** global sqlite3OsVtbl structure. Neither sqlite3_os_routine_XXX() function
+** is intriniscally thread-safe.
+**
+** External get/set access is only provided to the routines identified
+** by the hash-defined SQLITE_OS_ROUTINE symbols.
+*/
+#define SQLITE_OS_ROUTINE_OPENREADWRITE 1
+#define SQLITE_OS_ROUTINE_OPENREADONLY 2
+#define SQLITE_OS_ROUTINE_OPENEXCLUSIVE 3
+#define SQLITE_OS_ROUTINE_DELETE 4
+#define SQLITE_OS_ROUTINE_FILEEXISTS 5
+#define SQLITE_OS_ROUTINE_SYNCDIRECTORY 6
+void *sqlite3_os_routine_get(int);
+void *sqlite3_os_routine_set(int, void *);
+
+void sqlite3_os_enter_mutex();
+void sqlite3_os_leave_mutex();
+
/*
** Prototypes for routines found in os.c
*/