1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Change the OS interface layer to use traditional direct function call

implementations instead of the more complicated virtual function table.
Omit the asynchronous I/O demo. (CVS 2870)

FossilOrigin-Name: 2529c2e11fa1d345ec61f647e4f6fae20a7133d6
This commit is contained in:
drh
2006-01-06 14:32:19 +00:00
parent c87d34d05d
commit 66560adab3
29 changed files with 357 additions and 1360 deletions

View File

@@ -15,7 +15,7 @@
** Random numbers are used by some of the database backends in order
** to generate random integer keys for tables or random filenames.
**
** $Id: random.c,v 1.14 2005/11/30 03:20:32 drh Exp $
** $Id: random.c,v 1.15 2006/01/06 14:32:20 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -63,7 +63,7 @@ static int randomByte(){
char k[256];
prng.j = 0;
prng.i = 0;
sqlite3Os.xRandomSeed(k);
sqlite3OsRandomSeed(k);
for(i=0; i<256; i++){
prng.s[i] = i;
}
@@ -92,9 +92,9 @@ static int randomByte(){
*/
void sqlite3Randomness(int N, void *pBuf){
unsigned char *zBuf = pBuf;
sqlite3Os.xEnterMutex();
sqlite3OsEnterMutex();
while( N-- ){
*(zBuf++) = randomByte();
}
sqlite3Os.xLeaveMutex();
sqlite3OsLeaveMutex();
}