1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

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
This commit is contained in:
danielk1977
2009-04-23 14:58:39 +00:00
parent ceea33217b
commit a3f065980e
9 changed files with 1899 additions and 1740 deletions

1738
ext/async/sqlite3async.c Normal file

File diff suppressed because it is too large Load Diff

44
ext/async/sqlite3async.h Normal file
View File

@ -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_ */