**
*************************************************************************
**
-** $Id: sqlite3async.c,v 1.4 2009/04/25 08:39:15 danielk1977 Exp $
+** $Id: sqlite3async.c,v 1.5 2009/04/29 18:12:00 shane Exp $
**
** This file contains the implementation of an asynchronous IO backend
** for SQLite.
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ASYNCIO)
#include "sqlite3async.h"
-#include "sqlite3.h"
+#include "sqliteInt.h"
#include <stdarg.h>
#include <string.h>
#include <assert.h>
fprintf(stderr, "[%d] %s", 0 /* (int)pthread_self() */, z);
sqlite3_free(z);
}
+#else
+# define ASYNC_TRACE(X)
#endif
/*
}
static void async_sched_yield(void){
/* Todo: Find out if win32 offers anything like sched_yield() */
+ Sleep(0);
}
#else
if( rc!=SQLITE_OK ){
goto asyncread_out;
}
- nRead = MIN(filesize - iOffset, iAmt);
+ nRead = (int)MIN(filesize - iOffset, iAmt);
if( nRead>0 ){
rc = pBase->pMethods->xRead(pBase, zOut, nRead, iOffset);
ASYNC_TRACE(("READ %s %d bytes at %d\n", p->zName, nRead, iOffset));
(pWrite->pFileData==p) ||
(zName && pWrite->pFileData->zName==zName)
)){
- int iBeginOut = (pWrite->iOffset-iOffset);
- int iBeginIn = -iBeginOut;
+ sqlite3_int64 iBeginOut = (pWrite->iOffset-iOffset);
+ sqlite3_int64 iBeginIn = -iBeginOut;
int nCopy;
if( iBeginIn<0 ) iBeginIn = 0;
for(pIter=p->pLock->pList; pIter; pIter=pIter->pNext){
if( pIter->eLock>=SQLITE_LOCK_RESERVED ){
ret = 1;
+ break;
}
}
async_mutex_leave(ASYNC_MUTEX_LOCK);
/*
** Return the device characteristics and sector-size of the device. It
-** is not tricky to implement these correctly, as this backend might
+** is tricky to implement these correctly, as this backend might
** not have an open file handle at this point.
*/
static int asyncSectorSize(sqlite3_file *pFile){
+ UNUSED_PARAMETER(pFile);
return 512;
}
static int asyncDeviceCharacteristics(sqlite3_file *pFile){
+ UNUSED_PARAMETER(pFile);
return 0;
}
/* If zName is NULL, then the upper layer is requesting an anonymous file */
if( zName ){
- nName = strlen(zName)+1;
+ nName = (int)strlen(zName)+1;
}
nByte = (
** write-op queue to perform the delete.
*/
static int asyncDelete(sqlite3_vfs *pAsyncVfs, const char *z, int syncDir){
- return addNewAsyncWrite(0, ASYNC_DELETE, syncDir, strlen(z)+1, z);
+ UNUSED_PARAMETER(pAsyncVfs);
+ return addNewAsyncWrite(0, ASYNC_DELETE, syncDir, (int)strlen(z)+1, z);
}
/*
-C Modify\sthe\sassemblePage()\sfunction\sin\sbtree.c\sso\sthat\sit\sruns\sslightly\sfaster.\s(CVS\s6569)
-D 2009-04-29T17:49:59
+C Fixed\scompile\sfor\sMSVC;\s\sremoved\scompiler\swarnings;\schanges\sfor\sNDEBUG\sbuild;\sminor\scode\stweaks.\s(CVS\s6570)
+D 2009-04-29T18:12:00
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1
F ext/async/README.txt 0c541f418b14b415212264cbaaf51c924ec62e5b
-F ext/async/sqlite3async.c 2e1048922c1d544f0d2a7c3533909e5d67f466f2
+F ext/async/sqlite3async.c 207af6692a52cf1dc3a9e64c93dcd7f7a7db0a6f
F ext/async/sqlite3async.h b6d74dbf9aa5a0ac4e79aa15a4d987f3552a0f75
F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e
F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 58c7bdb21c719bf06713ff8ffa7ee51cf1973712
-R 9145a583971405864bb9bd62ca2de2c1
-U danielk1977
-Z d09c5a2c4f4e5bd4d6f77225050209bb
+P 7ec42e989f1d4abdc6d52f8feebf51985f36b2bd
+R 650f490b514ba52c11005770056d7df0
+U shane
+Z 14c530093810df3e24600cbed8dbd4c1