diff options
author | drh <drh@noemail.net> | 2005-11-30 03:20:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-11-30 03:20:31 +0000 |
commit | 054889ec6d2df4754468d2acfe6c92973f54ea2c (patch) | |
tree | 0dd1f8d5015e064fd666cb6253ad10c202ba4e34 /src/random.c | |
parent | 392b3ddf2ebe613d701ff3f912ac04b294ce0070 (diff) | |
download | sqlite-054889ec6d2df4754468d2acfe6c92973f54ea2c.tar.gz sqlite-054889ec6d2df4754468d2acfe6c92973f54ea2c.zip |
Restructure the OS interface yet again. This time make the OsFile object
a virtual base class which is subclassed for unix, windows, and the crash
test simulator. Add the new file "os.c" for common os layer code. Move
all OS-specific routines into the sqlite3Os structure. (CVS 2795)
FossilOrigin-Name: bd8740d1aecba69e1b5d64d43db07e8ad8841f07
Diffstat (limited to 'src/random.c')
-rw-r--r-- | src/random.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/random.c b/src/random.c index 3d0903b4e..7f38ef0ec 100644 --- a/src/random.c +++ b/src/random.c @@ -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.13 2005/06/12 21:35:52 drh Exp $ +** $Id: random.c,v 1.14 2005/11/30 03:20:32 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -63,7 +63,7 @@ static int randomByte(){ char k[256]; prng.j = 0; prng.i = 0; - sqlite3OsRandomSeed(k); + sqlite3Os.xRandomSeed(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; - sqlite3OsEnterMutex(); + sqlite3Os.xEnterMutex(); while( N-- ){ *(zBuf++) = randomByte(); } - sqlite3OsLeaveMutex(); + sqlite3Os.xLeaveMutex(); } |