diff options
author | danielk1977 <danielk1977@noemail.net> | 2009-04-23 14:58:39 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2009-04-23 14:58:39 +0000 |
commit | a3f065980e197c98c8e6ad4b744b01aed56d9241 (patch) | |
tree | 08ba7bab16c4cbb89f054f0670d71988d02eca8b /ext/async/sqlite3async.h | |
parent | ceea33217b5c825244e7cd1c3a4be47af0d56919 (diff) | |
download | sqlite-a3f065980e197c98c8e6ad4b744b01aed56d9241.tar.gz sqlite-a3f065980e197c98c8e6ad4b744b01aed56d9241.zip |
Move the asynchronous IO code from src/test_async.c to ext/async/. Refactor it to be a standalone module and to support windows. (CVS 6539)
FossilOrigin-Name: e71fb0fb8d83b4453c3c1e84606bf58d04926809
Diffstat (limited to 'ext/async/sqlite3async.h')
-rw-r--r-- | ext/async/sqlite3async.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/async/sqlite3async.h b/ext/async/sqlite3async.h new file mode 100644 index 000000000..c057432af --- /dev/null +++ b/ext/async/sqlite3async.h @@ -0,0 +1,44 @@ + +#ifndef __SQLITEASYNC_H_ +#define __SQLITEASYNC_H_ 1 + +#define SQLITEASYNC_VFSNAME "sqlite3async" + +/* +** Install the asynchronous IO VFS. +*/ +int sqlite3async_initialize(const char *zParent, int isDefault); + +/* +** Uninstall the asynchronous IO VFS. +*/ +void sqlite3async_shutdown(); + +/* +** Process events on the write-queue. +*/ +void sqlite3async_run(); + +/* +** Control/configure the asynchronous IO system. +*/ +int sqlite3async_control(int op, ...); + +/* +** Values that can be used as the first argument to sqlite3async_control(). +*/ +#define SQLITEASYNC_HALT 1 +#define SQLITEASYNC_DELAY 2 +#define SQLITEASYNC_GET_HALT 3 +#define SQLITEASYNC_GET_DELAY 4 + +/* +** If the first argument to sqlite3async_control() is SQLITEASYNC_HALT, +** the second argument should be one of the following. +*/ +#define SQLITEASYNC_HALT_NEVER 0 /* Never halt (default value) */ +#define SQLITEASYNC_HALT_NOW 1 /* Halt as soon as possible */ +#define SQLITEASYNC_HALT_IDLE 2 /* Halt when write-queue is empty */ + +#endif /* ifndef __SQLITEASYNC_H_ */ + |